Scheduled jobs with cron

Hello dear community,

I need your help  !

How can i scheduled one job every 14 days with cron  on uCMDB.

If i do that :

0 0 8 */14 * ?

it means ==>  "At 08:00:00am, every 14 days starting on the 1st, every month"

But i don't want his part "on the 1st". I just want every 14 days at 08am

Is there any possibilities to do that ?

Thanks by advance.

 

 

 
Parents
  • Because cron is "stateless", it cannot accurately express "frequencies", only "patterns" which it (apparently) continuously matches against the current time.

    Rephrasing your question makes this more obvious: "is it possible to run a cronjob at 08:00am every night except skip nights when it had run within 13 nights?" When cron is comparing the current time to job request time patterns, there's no way cron can know if it ran your job in the past.

    Therefore no, it is not possible to do exactly what you want with cron. You can use Interval scheduling for that. 

     

    Regards,

    Petko

Reply
  • Because cron is "stateless", it cannot accurately express "frequencies", only "patterns" which it (apparently) continuously matches against the current time.

    Rephrasing your question makes this more obvious: "is it possible to run a cronjob at 08:00am every night except skip nights when it had run within 13 nights?" When cron is comparing the current time to job request time patterns, there's no way cron can know if it ran your job in the past.

    Therefore no, it is not possible to do exactly what you want with cron. You can use Interval scheduling for that. 

     

    Regards,

    Petko

Children