How to schedule a job which would run on alternate mondays?
I need to schedule a job which would run only on alternate mondays of a month?
Can anybody tell me how can i go ahead with such scheduling? |
One answer
I need to schedule a job which would run only on alternate mondays of a month? Hi, The schedule page has the syntax and functioning very similar to Unix cron. In that sense, its support for every other is not that great. I would recommend putting a project on a schedule for every Monday. In that project set on the schedule, in the first step set the 'Inline' to your original project. I would then switch the 'Step Type' to 'Conditional'. In the 'Condition', it could check whether a marker file exists. If it doesn't exist, then in the 'Command' create the marker file and the inline will run. If the file does exist, then in the 'Else Command' delete the file so that next week the file will get created and the inline will run. You might have to switch around the if/else for easier syntax, but the general idea would be the same. You can run operating system commands in the 'Condition' field by putting them between backticks (ex. `ls -l marker_file`). Brent |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.