Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

submit command question

 
Phillip Tusa
Advisor

submit command question

Greetings to all ...

I am trying to use the submit command to execute a command procedure once a week on Monday at 3:00 AM.

I am not familiar with the submit command but from what I have read it should look something like this:

$ submit /noprinter/notify/after= ???? -
DSA20:[MDTSYS.COM]do_some_process.com

Any help would be appreciated!

Thanks!

--
Phil
"I'd rather be a VMS guy, any day of the week!"
4 REPLIES
Steven Schweda
Honored Contributor

Re: submit command question

A common scheme is to use a self-resubmitting
procedure (forum search for "resubmitting")
which runs every day at, say, 03:00, and
actually does something if it's Monday.

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1232913
Hoff
Honored Contributor

Re: submit command question

There's no shorthand construct for MONDAY in the OpenVMS date syntax, so you either need to calculate MONDAY using some date math, or (far easier, in my estimation) submit the self-requeuing job to run daily at 3AM, and then calculate MONDAY at run-time.

Here are examples of using SUBMIT /AFTER and calculating MONDAY on the fly:

http://64.223.189.234/node/97
http://64.223.189.234/node/501

There are various other discussions of submitting for a specific day of the week and of calculating a particular weekday using OpenVMS DCL date math around (Google is your friend), and it would certainly be nice if DCL saw the addition of weekday entries akin to the long-standing YESTERDAY, TODAY and TOMORROW constructs; adding /AFTER=TUESDAY, for instance.

The other option is to acquire and install a job scheduler, and Freeware and commercial options are available. (And discussed via links in the above articles.) I would encourage a scheduling package, as batch isn't a particularly good scheduler -- it works, but there's limited built-in error handling and no built-in error reporting.

Stephen Hoffman
HoffmanLabs LLC
Gregg Parmentier
Frequent Advisor

Re: submit command question


As long as you submit the first one for a specific Monday (say /after=9-jun-2008:03:00:00), this should work internal to the procedure.

This could be a problem if a particular run is delayed until tuesday because of a busy queue, but that's probably unlikely.

submit/after=today+7-03:00:00
Phillip Tusa
Advisor

Re: submit command question

Thanks everyone for your suggestions!

--
Phil
"I'd rather be a VMS guy, any day of the week!"