Scheduling future jobs today.

All questions about Control-M jobs definitions
Post Reply
User avatar
wdaforsythe
Nouveau
Nouveau
Posts: 2
Joined: 27 Sep 2010 12:00

Scheduling future jobs today.

Post by wdaforsythe » 27 Sep 2010 5:02

We are testing the migration of a system to some new hosts. As part of the user acceptance testing, the business wants to run all the jobs that would normally run an a future date in advance. For example, tomorrow (9/27/10), they would like to schedule and run all the jobs that would normally run on 10/22/10. Then, on the day after, they would like to run all the jobs that run on both 10/23/10 and 10/24/10. The day after that, they would like to run all the jobs that normally run on 10/25, etc....

Is there a way to modify the NewDay procedure of maybe the User Daily procedures to do that? The alternative seems to be to manually force all jobs and then get rid of the ones we don't want, every day. Which is a LOT of manual work!

Any help would be appreciated!

Thanks

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 28 Sep 2010 7:57

Wdaforsythe ,

First, why do you consider forcing all jobs and then deleting all those you do not want ? On which criteria? Do you intend to remove those which shouldn’t be ordered? In that case, why don’t you consider ordering rather than forcing?

Second, you normally have a set of user daily jobs to order your jobs on a daily basis. Why don’t you consider using the ctmudly for a future date? If you do so, your jobs will be ordered for a future date exactly as if you actually were at that date. Use the –odate option

If you use that facility, I don’t think you intend to wait for the future date to begin before testing your jobs. Use the –odate_option.

The basic syntax should then be:
ctmudly <a_user_daily_name> -odate 20101023 –odate_option value_date

Note that –odate_option option is the default and you normally don’t need to specify it. Pls double check on the doc and run a simple test.

Next, you will have to sort out what your dailies do. In case you use userdailies, which is normally recommended, you just activate the above command against all of your user dailies.

If you order “production” jobs using the daily SYSTEM, then you will probably need to order them manually.
Though I don’t see any obstacle to run the SYSTEM daily using a line command ctmudly, this command will order the user dailies in an improper format: the format of the command will be a simple “ctmudly <a_user_daily_name>” rather than the above format, and your jobs will be ordered for the current date rather than the future date.

Finally, you will need to clean your ajf after each test, for the jobs you order today for, let’s say, the 23/10 have good chance (I’m not definite on that point) to be removed on 24/10.
You can use the ctm_menu --> 10 --> 7 (Reset CONTROL-M Active Environment), but this removes the resource definitions as well as the ctm log contents.
You can use a direct sql (delete from cmr_ajf where ODATE=’20101023’) but you’d better do that when no job is running for that date: otherwise, the resource (CTL and QR) situation might be unstable.

Cheers
Nicolas Mulot

User avatar
wdaforsythe
Nouveau
Nouveau
Posts: 2
Joined: 27 Sep 2010 12:00

Post by wdaforsythe » 02 Oct 2010 7:05

Thanks for the reply! You helped us look in the right direction and we are able to order our jobs the way we want for our tests!

Post Reply