Schedule a job for working day of the month

All questions about Control-M jobs definitions
Post Reply
User avatar
cheli
Nouveau
Nouveau
Posts: 12
Joined: 13 Jan 2010 12:00
Location: Abu Dhabi

Schedule a job for working day of the month

Post by cheli » 12 May 2013 1:37

I want to schedule a job to run every 16th of the month, but if it is Saturday or Sunday then it should run on Monday. Can somebody help me to do it without defining a new calendar.

User avatar
th_alejandro
Nouveau
Nouveau
Posts: 188
Joined: 26 Nov 2008 12:00
Location: Bogotá

Without calendar

Post by th_alejandro » 15 May 2013 6:05

It's more efficient using a Calendar in this case. :D

But other ideas :

- Create a script that depends of 'dates' to run this job in a text file. Ex:
01-16-2013
02-18-2013 (02-16-2013 is saturday)
03-18-2013 (03-16-2013 is saturday)
04-16-2013
05-16-2013
06-17-2012 (06-16-2013 is sunday)
..
...

Then, create a function in the script. that evaluate current date vs dates in the text file. So, if this dates are equal, run the job.

Your process must run every day, but the initial script check for date and determine if the job really run or not on that date. 8O

User avatar
matom
Nouveau
Nouveau
Posts: 37
Joined: 29 Nov 2006 12:00
Location: Ile de France

Post by matom » 16 May 2013 4:23

Hi cheli,

If a workday calendar (Sat & Sun non business days) was available:
Month Days: 16 (Do not fill calendar field)
Confirmation Calendar : WorkDaysCal Shift : Next Day

Regards

Post Reply