Search code examples
linuxcroncron-task

Crontab schedule every hour + custom rule


I want to have cron run a task every 5th minute from 20-24 hour, but also need it to run once at 00:15:00. How do I accomplish this?

* */5 20,21,22,23,24 * * *

Solution

  • The sequence is minute, hour, day of month, month, day of week, [user] command, so you have to put

    */5 0,20,21,22,23 * * * user /path/to/command