RE: User Daily jobs and the New day procedure

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

RE: User Daily jobs and the New day procedure

Post by Dylanesque » 07 Dec 2009 10:20

I found this procedure in the Admin Guide...

Assume that a site uses scheduling tables TBL1 through TBL5. The administrator, Bill,
implements User Daily jobs for use with the New Day procedure as follows:

1. Bill edits the existing scheduling table definitions to associate User Daily names with the tables:

He associates scheduling tables TBL1 and TBL2 with User Daily name UD1.
He associates TBL3 and TBL4 with UD2.
He associates TBL5 with UD3.

2. Bill creates scheduling table UDTABLE and associates it with User Daily name SYSTEM.
3. In UDTABLE, Bill creates the following User Daily jobs:
He creates job UDJob1, which runs the command ctmudly UD1 at 8:00 A.M.

He creates UDJob2 to run ctmudly UD2 at 2:00 P.M.
He creates UDJob3 to run ctmudly UD3 at 8:00 P.M.

Based on these settings, the New Day procedure scans UDTABLE during New Day processing. The results are as follows:
At 8:00 A.M., User Daily job UDJob1 runs and schedules jobs from the TBL1 and TBL2
scheduling tables.
At 2:00 P.M., UDJob2 runs and schedules jobs from TBL3 and TBL4.
At 8:00 P.M., UDJob3 runs and schedules jobs from TBL5.


This explains things in a little more detail but I'm still unsure as to how you get these jobs to run ctmudly at the specified times ? I can only see dates and schedule between certain dates mentioned in the scheduling tab or between times in the exe tab.

I can see however, that you can enter specific times in the execution tab but I'm not sure of the format ? Should I just enter the three differènt times here for each of the user daily jobs in the UDTABLE and enter ctmudly "User Daily Name" ?

May thanks....

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 07 Dec 2009 10:39

Just managed to get access to a test system so have been playing around with this...

I assume if I just enter in ctmudly "tablename" in the OS command and specify the time it will run it for me ?

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 07 Dec 2009 12:15

No Dylanesque, it will not run as you need to provide Userdaily name here not Tablename.

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 07 Dec 2009 12:29

Thanks rahulsehgal,

That's what I meant. Just set up a test here and specified the User daily name associated.

Was just reading the docs over the weekend but makes a huge difference when you actually test it properly so apologies for all of the basic questions !

Just one more thing in relation to scheduling jobs at a specifc time..

Let's say you just specify the time in the execution box for a particular day, wouldn't the new day procedure just move the job to the active jobs file and run it for that time or does the new day procedure which runs once at a defined time only run jobs whose scheduling criteria have been met I.e Is User daily jobs the only way of getting jobs to run at a different time than new day ?

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 07 Dec 2009 2:47

Hi Dylanesque,

This is how you make Userdaily.

1) You first create a Job with Command as ctmudly <userdailyname> with Scheduling table name as NEWDAY(or whatever you want) and specify the time in execution tab for this job in Job definition, write and upload this Job in Control-M.
2) Now you will go in Scheduling Table Manager in Control-m Desktop ---> Check for this NEWDAY table ---> Click on Table Details option ---> write SYSTEM in Useraily name.
3) Now click on Table Details for any scheduling table you want to specify User daily too ----> and write the <userdailyname> you gave in command line before (for the job in NEWDAY Table).


Now when new day will run it wil place NEWDAY table in Control-M Active Job file, after that Userdaily job will run as per time given in Execution Tab and will run the command ctmudly <userdailyname>, now this command will bring all the jobs related to that userdaily name(Which we specified in Table Detail option for Scheduling Tables) and that needs to order in Control-m as per there Scheduling Criterea.

Regards,
Rahul Sehgal

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 07 Dec 2009 3:52

Excellent, many thanks .

I set this up however my useradaily job didn't kick in at the specified time (I just entered in the time in the Run at box and specified the command ctmudly UD3).

I tested just involking ctmudly UD3 at the command line just to test and it ran all jobs accociated with UD3 so must be something to do with the time I have set up. Does Control-M Server run off the local OS's clock ? If so I would have expected it to run anything associated with UD3....

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 07 Dec 2009 4:04

Hmm, so even though I have specifed the time....I still have to wait until the new day procedure run the following day and moves it into the active job file which will run it then ? Unless of course I run it manually by forcing it ?

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 08 Dec 2009 10:43

HI Dylanesque,

Control-M has same time as Server time on which it is installed, so Use your Server time where Control-M is installalled in Military format (HHMM).

Regards,
Rahul Sehgal

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 08 Dec 2009 11:47

Hi Rahul,

Firstly, many thanks for your patience on this...I'm trying to run through a few test scenarios which have certaininly helped but having a few probelms with my VM so tricky to replicate!! ( Just reading the documentation doesn't suffice !)

Ok, we've clarified that event if you do set up a userdaily job it will only run when it's scheduled per calender or specefied time when the new day kicks off in the morning as it just places jobs in the active jobs file of both DB's.

So, what if I want to schedule a job after new day has passed ?

For example, it's 09:00am after new day and I create a job that I want to run at 11:00am so I select the day in the calender of the job defintion and speify the time, I assume all I need to do is manually order/force the job which will also place in the Active jobs file and run it at 11am ?


Thanks and regards,

Dylan

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 08 Dec 2009 2:09

Hi Dylanesque,

You will get whole information about this in following document:-

https://www.scheduler-usage.com/forum/document/files ... G52300.pdf

Just go through "Creating or modifying scheduling tables" in chapter 7, that will help you in understanding the concept, and search for New Day in this document, it will explain you about the New Day Procedure.

Regards,
Rahul Sehgal

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 08 Dec 2009 3:03

Thanks again but still not sure how to get control-M to schdule a job as described above after new day has passed ?

I assume, any tables and their associated jobs that haven't system specified won't be run unless you get new day to run user daily jobs ?

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 08 Dec 2009 3:11

Hi,

Are you uploading the table again in Control-M after writing the Userdaily name in the Table Detail option, as it is require after writing Userdaily name

User Daily jobs are used when you have large number of jobs to be run in Control-M .

If you have less amount of Jobs then you can use Simple Method of defining SYSTEM in Userdaily name under Table Detail option in Scheduling table manager,

Make sure you always upload the table again after defining SYSTEM in Table Detail option otherwise jobs will not load in Control-M at newday, do this and let me know is this working out for your tables, are they able to load in New Day time when you define SYSTEM in Userdaily name and Upload them back to Control-M Using Table Upload option in Scheduling Table Manager?

Regards,
Rahul Sehgal

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 08 Dec 2009 3:26

Hi Rahul.

Yes, I tested successfully running my userdaily jobs and they all ran today but I stil can't figure out how to run a job at a specific time afer new day in the example above ?

I assumed that I could do this by not specifying NEWDAY with the associated table and it would just run the command at the time specifed.

What happens to jobs that don't have SYSTEM mentioned ? I assume they won't run unless there is a time specifed in the execution tab to run or unless they have been kicked off by user daily jobs..

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 08 Dec 2009 4:47

That's good, now let's carry on with second step

1) write any <userdailyname> for Scheduling tables(you want to bring in Control-M at other time then New Day) in Table Option in Scheduling Table Manager and upload it back to Control-M using Scheduling Table Manager to save the changes.

2) Create a job with command as ctmudly <userdailyname> and run it on the time when you want to bring associated scheduling table in Control-M using Execution Tab, upload this job in Control-M.

3) Write SYSTEM in table option for Scheduling table for Job you created with Command line as ctmudly, upload the table again to save the changes.

Now the job with command ctmudly <userdailyname> will come in Newday time as SYSTEM is given for this job as Userdaily and the Scheduling table associated with this Userdaily job will come when this job will execute as it will execute command ctmudly.

Please go through the steps and let me know the step number which you will not understand.

User avatar
Dylanesque
Nouveau
Nouveau
Posts: 19
Joined: 06 Dec 2009 12:00

Post by Dylanesque » 08 Dec 2009 5:25

Thanks Rahul,

Will try that now, once again many thanks :D Absolutly brilliant !

Post Reply