Cron job for everyday at 5pm

Viewed 633

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.

2 Answers

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):

enter image description here

enter image description here

Related