determine last working day on job command line...

All questions about Control-M jobs definitions
Post Reply
User avatar
wrenchos
Nouveau
Nouveau
Posts: 7
Joined: 07 Jan 2010 12:00

determine last working day on job command line...

Post by wrenchos » 29 Sep 2017 9:09

Hi, I am trying to work out the last working day of the previous month and although I have used calcdate before I can only determine the last working day of the month. Is there a way of querying the calendar in controlm to determine what the last working day would have been? I have set the job to run on the 5th working day of each month and would like it to use the last working day as a job parameter for a file watcher. ctmfw.exe.

Any suggestions would be much appreciated.

Regards

User avatar
Ekremo
Nouveau
Nouveau
Posts: 14
Joined: 03 Apr 2009 12:00
Location: Switzerland

Re: determine last working day on job command line...

Post by Ekremo » 09 Oct 2017 3:15

Can you share how you have used calcdate in order to determine the last working day of the month?

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

Re: determine last working day on job command line...

Post by matom » 16 Oct 2017 11:59

Hi wrenchos,

Below an example to calculate the last working day of a month :

MyJOB run every working day except the last one. I'm looking for the last working day for MyJOB in December, 2017 :

ctmcalc_date -FOLDER MyFOLDER -NAME MyJOB -date 20180101 -shift -1 -ONLY_WORKING_DAYS Y -OUTPUT_FORMAT DATE

Result : 20171228

Regards
Attachments
ViewScheduling_MyJOB.jpg
Calendar snapshot : December,2017 and January,2018
ViewScheduling_MyJOB.jpg (26.32 KiB) Viewed 21595 times
Calendar snapshot : December,2017 and January,2018
Calendar snapshot : December,2017 and January,2018
ViewScheduling_MyJOB.jpg (26.32 KiB) Viewed 21595 times

Post Reply