Search code examples
croncron-task

Cron Scheduler use case


I am stuck and seek your help for my requirement , where I need to run a job everyday except on Sunday mornings from 05:30 AM to 08:30 AM.

I have searched and could not see the solution for my problem, could you be able to help me out to get the correct Cron Expression. I have also tried it using http://www.cronmaker.com/


Solution

  • i think the easiest solution in cron is:

    1. start your program without any limit

    2. stop your code at 5:30 AM on sundays

      30 5 * * 7 stop_code

    3. start your code at 8:30 Am on sundays

      30 8 * * 7 start_code_again