1
Is there any way to schedule the CRON job for different days of different months!

For Example: I need to schedule the job from February 25 to March 10 2017.this can be done by creating 2 jobs as "0/1 * 25-28 2 2017 /cronjob.sh" and "0/1 * 1-10 3 2017 /cronjob.sh"

But, cant I do it in one job? is there any way to do that!

AnilCk
  • 106
  • 3
  • 12

1 Answers1

0

No, you can't easily do this with just one cronjob.

You could, if you combine cron with some other scheduler, as in 0 * * * * otherScheduler && /cronjob.sh. But that's more complicated than simply two cronjobs.

You also could do this by changing the date on your server such that the cron schedule is from February 15 to 28. But that would be confusing and only useful if your server doesn't need to run anything else.