1

I want to run a command everyday but I am not sure how to do it correctly with the cron task.

I understand this is the code I need to know:

* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)

If I do this * * * * * this mean it runs every minute, right?

What about everyday, particularly each day at 1AM?

Is it this 0 0 * * * for running the command everyday?

Run
  • 2,639

1 Answers1

3

Try this.

0 1 * * * command > /dev/null 2>&1
Ravexina
  • 55,668
  • 25
  • 164
  • 183
kunal
  • 442
  • 1
  • 9
  • 23