2

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.

Giulio Caccin
  • 2,962
  • 6
  • 36
  • 57
sharath kumar
  • 21
  • 1
  • 2
  • can you please show the code you have tried? – Giulio Caccin Jul 23 '19 at 08:30
  • Hi Caccin, Thanks for you comment. I tried with --delay 30 which did not worked. – sharath kumar Jul 23 '19 at 10:19
  • I have updated your question with the code you have used, please put also the error you saw, in this way you will probably get an aswer quickly – Giulio Caccin Jul 23 '19 at 10:26
  • A dummy job (as in a Control-M job that is set to "run as dummy" or just tasktype = dummy) will not execute anything. It will just turn green/ok. Running jobs like this is meant to be a placeholder in the flow. You need to run your job as tasktype = command. If on Windows use Control-M utility _sleep (i.e. **_sleep 600** will sleep for 10 minutes or **sleep 600** on Unix). – Mark Jul 23 '19 at 17:25
  • You could even use the Agent **_sleep** command, which has the advantage of working the same way regardless of the operating system. – racherb Jun 03 '20 at 18:22

2 Answers2

2

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

Jasper
  • 192
  • 8
1

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.

racherb
  • 335
  • 1
  • 10