最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Cron job for everyday at 5pm - Stack Overflow

programmeradmin1浏览0评论

I want to run a cron job at 17:00 everyday. Which one is the correct format?

0 17 * * * or 0 */17 * * *

or are they both same? Please do tell the difference.

I want to run a cron job at 17:00 everyday. Which one is the correct format?

0 17 * * * or 0 */17 * * *

or are they both same? Please do tell the difference.

Share asked Dec 1, 2021 at 8:28 N.AN.A 2751 gold badge4 silver badges8 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

The first is correct - it runs at 17:00 each day. The second runs every 17 hours. So 17:00 the first day, 10am the next and so on. You can test your cron configurations at https://crontab.guru/. Other similar sites are available.

Here you are a list of examples for CRON tasks (source):

发布评论

评论列表(0)

  1. 暂无评论