1753525 Members
5648 Online
108795 Solutions
New Discussion юеВ

Submit After Question.

 
SOLVED
Go to solution
Al Taylor 2
New Member

Submit After Question.

How do I submit a procedure to run each hour at the 20'th minute. It's running fine now each hour but the minutes float a few seconds each time. When it floats too much it conflicts with another procedure.

Thanks...
10 REPLIES 10
marsh_1
Honored Contributor

Re: Submit After Question.

al,

use something like this at the beginning of your procedure :-
hh =f$cvtime("","comparison","hour")
hh = hh + 1
submit/after="today+''hh':20"/etc ....

hope this helps
Jim_McKinney
Honored Contributor

Re: Submit After Question.

> submit/after="today+''hh':20"/etc ....


To span days

$ if hh .ne. 23
$ then
$ submit/after="today+''hh':20"/etc ....
$ else
$ submit/after="tomorrow+0:20"/etc ....
$ endif
Hein van den Heuvel
Honored Contributor

Re: Submit After Question.

You do NOT want add an hour to the hours.
Let DCL do the math.

Along the same lines, but midnite proof:

$ write sys$output -
f$cvtime(f$cvtime("",,"HOUR")+":20:00 +1:0:0")

Hein.



Jess Goodman
Esteemed Contributor
Solution

Re: Submit After Question.

$ runmin := 20 !Run at 20 minutes after hour
$ next_hour = f$cvtime("+0-1","ABSOLUTE")
$ rundate = f$cvtime(next_hour,"ABSOLUTE","DATE")
$ runhour = f$cvtime(next_hour,,"HOUR")
$ runtime = rundate+":"+runhour+":"+runmin
$ submit job /after='runtime'

Good luck
I have one, but it's personal.
Hoff
Honored Contributor

Re: Submit After Question.

A free-running SUBMIT /AFTER is unlikely to do exactly what you want for all cases, particularly if drifting a few minutes gets you into trouble with and into conflict with other jobs. (Even if this batch job is started correctly -- and there are examples of how to do that in this thread -- there can still be a blocking batch job, reboot, or other perturbations that can throw off the actual start time.)

Better to more explicitly coordinate the jobs, with either a commercial scheduling package (various are available), or something akin to the Kronos Freeware package.

OpenVMS itself lacks a scheduling package.

The brute-force approach is to coordinate the multiple jobs that need sequencing with SYNCHRONIZE and/or with use of a single-slot batch queues and/or other similar and more explicit techniques.

Rolling your own site-specific tailored scheduling package is probably a day of coding and a day or two of testing.

marsh_1
Honored Contributor

Re: Submit After Question.

the trouble is with most all of the commercial packages is finding enough justification to persuade the bean counters to hand over the money as they tend not to be too cheap, as well as taking the risk assessment ride.
depends from company to company what they like to see as far as 'legitimate' software solutions ( gartner magic quadrant, turnover in excess of ...., OEM partner etc) goes.
if you're talking about vms specific functionality among the mainstream scheduling packages it can tend to be a bit patchy - ibm's tws uses a 3rd party agent from itheon, bmc's control-m agent for vms has'nt really been updated for years and lacks most of the functionality found in their other agents on more common platforms. certainly only a handful
actually run the server part of the app on vms whether the distributed or centralised model.
if it's freeware and the app is mission critical most places won't want to touch it without the 'safety net' of a support contract. fiddling with these things natively
in dcl or otherwise will often be tolerated to a degree as long as nothing goes wrong too badly too often.
anyway a few thoughts FWIW.


Hoff
Honored Contributor

Re: Submit After Question.

Mark, that's what makes enterprise computing such an interesting and involved effort; the vast accretions of administratium require equally vast sums of money and of staff effort to bypass the inherent deadlocks. This can be inefficient yes, but quite familiar.

Sometimes doing things as they've always been done is the political win.

Sometimes doing those same tasks more efficiently trumps the status quo.
marsh_1
Honored Contributor

Re: Submit After Question.

hoff,

enterprise computings going to hell in a handcart at an increasing rate of knots ! being driven by technology for technologies sake.
everybody thinks they should have it,if they have got it, most of them don't really understand what they bought into in the first place and whether they actually needed it.
it's certainly getting harder to fight your way through the fud !

:-)
Al Taylor 2
New Member

Re: Submit After Question.

Jess Goodman's suggestion is working very well. I'll know tomorrow if it continues to the next day. Thanks for all your help.

I was a VMS exprt for 15 years and did not even know all this still existed. I went off doing different stuff and now am back doing what I was born to do. It's all slowly coming back. I walk aroung the plant and see Dec equipment that I though was all in landfills by now.