Operating System - OpenVMS
1751798 Members
5215 Online
108781 Solutions
New Discussion

creating a scheduler job to run on friday at 8am

 
aliyesami
New Member

creating a scheduler job to run on friday at 8am

on openVMS Alpha servers how can i do it ?  if i set the day to "Friday"  when creating the job it doesnt take it and sets the DAYS to ALL

3 REPLIES 3
Steven Schweda
Honored Contributor

Re: creating a scheduler job to run on friday at 8am

> creating a scheduler job to run on friday at 8am

   What, exactly, is "scheduler"?

> on openVMS Alpha servers how can i do it ?

   A VMS forum would be a better place for this than an "Alpha Servers"
forum.  Perhaps a moderator can move it.

Hein van den Heuvel
Honored Contributor

Re: creating a scheduler job to run on friday at 8am

OpenVMS itself does NOT come with a job scheduler as such.

It does have a batch job queue manager so which you can submit jobs to run at a certain time, but not on a schedule.

It does not understand 'Friday' without help. 

What scheduler are you refering to ? JAMS? Where do you enter 'Friday' (share full command, or even GUI screen shot?)

 

Now just using the OpenVMS batch queue, what folks typically use are 'self submitting batch jobs'.

You submit them once, and when activated the first thing they do is re-submit themselves for a future time with the appropriate date/tiem math. For example, for 6am next week use: "06:00 +7-"

Personally I would recommend moving the logic up.

Have one master batch job to resubmit every day (or every hour or whatever) and have that job have simple logic to submit the appropriate jobs only on the right days/times.

Good Luck!

Hein.

 

Arch_Muthiah
Honored Contributor

Re: creating a scheduler job to run on friday at 8am

Hi Aliyesami,
As Hein said you may want to try the below short DCL script as self-submitting batch job as we mostly use if you don't have DECScheduler.

I just wrote and tested this quick script, give a try and lets know.
You need to submit this on Friday and from there it will start self submit every friday  

$ tode = f$cvtime("today","absolute","date")
$ todenam = f$edit(f$cvtime("''tode'",,"weekday"),"upcase,collapse")
$ if todenam .eqs. "FRIDAY"
$ then
$!tom = f$cvtime("''tode'+7-","absolute","date")
$ submit/after="''tom'+20:00" disk$:your_friday_job.com
$ backup-or-any-commands ...... /*your command to run on Friday*/
$ else
$ write sys$output "Submit on Friday"
$ endif
$ exit  

otherway, you just move the submit command to the top and let it run through only if it is FRIDAY as below, otherwise $EXIT it.

$ tode = f$cvtime("today","absolute","date")
$ todenam = f$edit(f$cvtime("''tode'",,"weekday"),"upcase,collapse")
$ submit/after="TOMORROW+20:00" disk$:your_friday_job.com
$ if todenam .eqs. "FRIDAY"
$ then
$ backup-or-any-commands ...... /*your command to run on Friday*/
$ endif
$ exit

Thanks
Archie

Regards
Archie