I have to write a wrapper script to run 3 jobs in control M if a variable is Y i.e
$EOM_1=’Y’ [incase of End of Month true]
$EOM_1=’N’ [incase of End of Month false]
i.e if $EOM_1=’Y’ run jobs like ${DirTOOLS}/WaitUnitFileExists.sh $APIS/files/tr/chqload/local/INWUSD.dat 60 05 30
Why is the wrapper script needed? You can do this with the Job Defintions within Control-M. In the DAYS field in the job scheduling defintion for the job to run the last day of the month you would put L1.
For the Job that will run all but the last day of the month you specify -L1 in the DAYS field. For the job that has to wait on a file, run the Control-M File watcher utility that will then add the condition for the job or force the job in to run.
Related
I want to make a VDP scheduler job in Denodo 8 wait for a certain amount of time. The wait function in the job creation process is not working as expected so I figured I'd write it into the VQL. However when i try the suggested function from the documentation (https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/wait) the Denodo 8 VQL shell doesn't recognize the function.
--Not working
SELECT WAIT('10000');
Returns the following error:
Function 'wait' with arity 1 not found
--Not working
WAIT('10000');
Returns the following error:
Error parsing command 'WAIT('10000')'
Any suggestions would be much appreciated.
There are two ways of invoking WAIT:
Option #1
-- Wait for one minute
CALL WAIT(60000);
Option #2:
-- Wait for ten seconds
SELECT timeinmillis
FROM WAIT()
WHERE timeinmillis = 10000;
I have the requirement to run dummy jobs for 30 minutes and 60 minutes respectively.
I have tried with --delay 30 in command line jobs, but I did not get the expected delay.
Designating a job as type ‘dummy’ will bypass anything contained within the command line field.
You have two options to create a 30/60minute timer job.
Option a:
Make the job a command line type job and put sleep 1800 or sleep 3600 in the command line field.
Option b:
Make the job a dummy type job and put sleep 1800 or sleep 3600 in either the pre-execution or post-execution fields.
By default the sleep command operates on seconds. For windows you may want to look into using the power shell version which would be powershell.exe -command start-sleep 1800
Use _sleep over sleep instead
Another way to enable a waiting time, either before or after an OS-type Job is by using the pre-execution or post-execution command options, as appropriate.
The use of _sleep is more convenient because it is operating system independent and is provided by the Control-M/Agent, which means that you do not require an extra deployment for that functionality.
I had configured my cronjob to run in every first Monday of the month 8:40am as below
40 08 1-7 * 1 /fs/test/testtime.sh
But it not only run on Monday, it also run on today which is Tuesday.
Is there anything i miss out?
From the man page for crontab (my emphasis):
Note: The day of a command's execution can be specified by two fields - day of month, and day of week. If both fields are restricted (i.e., aren't *), the command will be run when either field matches the current time.
For example, 30 4 1,15 * 5 would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.
So, in your case, the job runs on every one of the first seven days in each month, plus every Monday.
You can do what you wish by adding an AND condition in the command rather than relying on an OR condition in the time specification, something like:
40 08 1-7 * * test $(date +\%u) -eq 1 && /fs/test/testtime.sh
This will run the actual cron job on all those days (first seven days in each month) but the payload (the script) will only run if the day is Monday.
I am using C# COM-Interop to automate the creation of a MS-Project file.
After the creation of the MS-Project file, I create some indented tasks that receive by a web service.
Test1 duration=? startDate=?
|-Test2 duration="1 day" startDate="02/08/17"
|-Test3 duration=? startDate=?
|--Test4 duration="3 day" startDate="03/08/17"
|--Test5 duration="2 day" startDate="05/08/17"
|-Test6 duration=? startDate=?
|--Test5 duration="1 day" startDate="08/08/17"
For each main task of the file, I want to calculate the duration and the start date of a task according to the tasks that are under it. But I don't know what kind of properties I can use to do so.
Start and Finish dates of Summary tasks are calculated automatically; you do not need to calculate the duration or Start/Finish dates of a Summary task.
I made a small script to take take previous date as argument. The script is running fine but when running this script from crontab it takes todays date
Script
Previous_day=`date --date="-1 days" +% Y% m% d`;
./some_script -date $Previous_day ;
Some_script is script which takes date as argument provided using -date
This is solaris box
Dont know why when running from crontab it runs with argument as today's date
% is a special character in Cron, so you should escape the date parameters:
Previous_day=`date --date="-1 days" +\%Y\%m\%d;