Search code examples
croncron-taskcrontrigger

Run script every 5 minutes on specific Seconds


I want to run a script every day, every 5 minutes at hour:minute:20 seconds between 09:00 and 22:00

I know how to configure the cron job between these hours and every 5 minutes, but it is very important to run it at hour:minute:20 seconds...

Is there a way to achieve that?


Solution

  • Thank you @JGrice

    first one runs from 09:00 to 21:55

     */5 9-21 * * * sleep 20; script
    

    and this one at 22:00

     0 22 * * * sleep 20; script