I have a system reading satellitedata. The data is processed and all the
process jobs show up in the queues. But I do not understand how the
processes are started.
In LINUX/UNIX it is the cron deamon controling what to start when. But
what triggers the processing jobs in my system, OpenVMS 6.2.
Regards
Trygve Aspenes
The simplest way to do it in VMS is for the batch job that does your
processing to submit itself to run at some point in the future.
Look up SUBMIT /AFTER in Help.
Doc.
--
Time and money, the psychotropics of the business world...
~ VAXman https://vmsbox.cjb.net
Good suggestion. However, at least the SUBMIT command should be as
early as possible in the procedure, so that it gets submitted even if
the batch job doing the submitting has problems. Also, since the file
specification of a batch job is determined at submit time, not at run
time (i.e. logicals translated, version number determined etc), it might
be better to have the "real" batch job code in a separate file which is
then executed from the batch job which resubmits itself. That way, one
can change the code being executed without having to delete and resubmit
batch entries.
[deletia]
>then executed from the batch job which resubmits itself. That way, one
>can change the code being executed without having to delete and resubmit
>batch entries.
You can always use copy/overlay to replace already submitted command procedures.
--
Ooroo
Mark F...
Another Optus Cable Traffic Monitor.
http://www.members.optushome.com.au/forsythm/traff/
Today is Pungenday, the 28th day of Chaos in the YOLD 3169
- A FTP session can start the processing.
- A TCPIP RPC call can do it.
- A RECEX (RSH) call can start it.
- A polling process (looking in some directory) can.
- A CRON job (yes, a port of th UNIX tool) can.
Now, what starts things on *your* system is, of course
very hard to say. Why not just ask the system manager :-)
Jan-Erik Söderholm.
The batch processing system on VMS is a little more like the "at"
command on UNIX than the cron daemon.
Processes are started by the batch system when the time for a
batch job is reached. The default if no time is specified is "right
now" (don't have to wait for a daemon to cylce). Jobs are entered
into the queue when some software calls sys$sndjbc, the most common
way to do this is the DCL command "submit". Many other techniques
exist so the user doesn't usually need to call sys$sndjbc directly.
How is SUBMIT /AFTER like cron? Suppose I want a job to run every
Tuesday and Saturday? Do I chain the job by making each one do
another "SUBMIT /AFTER"?
Seems to me like SUBMIT /AFTER is like at(1) or batch(1) not cron(8).
On 28 Jan 2003, baby_...@yahoo.com (Baby Peanut) wrote:
>"Doc.Cypher" <doc_c...@redneck.gacracker.org> wrote in message
>news:<200301281117...@gacracker.org>...
>> NOTE: This message was sent thru a mail2news gateway.
>> No effort was made to verify the identity of the sender.
>> --------------------------------------------------------
>>
>> On Tue, 28 Jan 2003, Trygve Aspenes <tal...@nospamonline.no> wrote:
>> >Hello
>> >
>> >I have a system reading satellitedata. The data is processed and all the
>> > process jobs show up in the queues. But I do not understand how the
>> >processes are started.
>> >
>> >In LINUX/UNIX it is the cron deamon controling what to start when. But
>> >what triggers the processing jobs in my system, OpenVMS 6.2.
>>
>> The simplest way to do it in VMS is for the batch job that does your
>> processing to submit itself to run at some point in the future.
>>
>> Look up SUBMIT /AFTER in Help.
>How is SUBMIT /AFTER like cron? Suppose I want a job to run every
>Tuesday and Saturday? Do I chain the job by making each one do
>another "SUBMIT /AFTER"?
>
>Seems to me like SUBMIT /AFTER is like at(1) or batch(1) not cron(8).
If you want to be really pedantic about it, yes, there is no direct
equivalent to cron within VMS. But that wasn't the question asked by the
original poster.
In the job which resubmits itself:
$ THIS_NAME = F$PARSE(F$ENVIRONMENT("PROCEDURE"),,,"NAME")
$ THIS_TYPE = F$PARSE(F$ENVIRONMENT("PROCEDURE"),,,"TYPE")
$ THIS_FILE = THIS_NAME + THIS_TYPE
$ SUBMIT/AFTER=TOMORROW THIS_FILE
$ @ SOME_OTHER_FILE.COM
$ EXIT
$ IF F$CVTIME(,,"WEEKDAY") .EQS. "Tuesday" .OR. -
F$CVTIME(,,"WEEKDAY") .EQS. "Saturday"
$ THEN
<do the stuff here>
$ ELSE
$ EXIT
$ ENDIF
$ EXIT
> How is SUBMIT /AFTER like cron? Suppose I want a job to run every
> Tuesday and Saturday? Do I chain the job by making each one do
> another "SUBMIT /AFTER"?
>
> Seems to me like SUBMIT /AFTER is like at(1) or batch(1) not cron(8).
Don't remember, if it is on the VMS freeware CD - or was posted here in c.o.v.,
but there is
a nice procedure calculating all kinds of time differences
to be used in SUBMIT/AFTER, also "Submit at next saturday".
From the header:
Procedure: Compute_Time.Com
Version: 1.00
Author: R.A. Berglin, SSC LTS
Date: September, 1990
Language: VAX/VMS DCL, Version 5.3-1 (backward compatible to V4)
Modifications:
Purpose: Accepts specialized date/time entries, and computes
an absolute VMS time (22 or 23 character string) based
on the inputs. Mainly intended to compute offsets for
submitting and re-submitting batch files. The return
value is in the global symbol COMPUTED_TIME.
Usage Examples: $ @Compute_Time DAY 1
$ @Compute_Time TU 17:00
If You don't find it in the usual archives or freeware CD's, get it from my system:
http://wwwvms.mppmu.mpg.de/util_root/com/compute_time.com
And if You don't like SUBMIT/AFTER, there ARE cron implementations for VMS,
again look into the freeware CD/archives.
--
Joseph "Sepp" Huber mailto:joseph...@web.de http://www.huber-joseph.de/
I believe it was Rob Young that had a CRON.COM DCL proc. that could be
kicked off as a detached process.
Was this ever submited to Hunter Goatley's freeware archive? I don't see
it listed.
Are there any others that would be worthy of note?
This comes up often enough that maybe it oughtta be developed in a
compiled language (C?). The gripe there, of course, is introducing
security risks.
--
David J. Dachtera
dba DJE Systems
http://www.djesys.com/
Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/
No. But groups.google.com is your friend. Like Google itself,
the more popular ones bubble to the top.
Here is a link:
http://groups.google.com/groups?selm=t8CxB4TcKkNk%40eisner.encompasserve.org&oe=UTF-8&output=gplain
To raise confidence a bit, we are using it in production. Sometimes
you get wearisome hacking out the DCL to fit the time span(s).
For instance, this took all of a few minutes to setup:
# Create and mail user accounting report for Townname at 05:33 am Monday morning
#
33 5 * * 1 Submit/Noidentify/Queue=Sys$batch -
/User=System/Log=Site$Log:Townname_Accounting.Log/Noprint -
Site$Tools:Townname_Accounting.Com
#
Since it is production, we run a detached helper DCL utility in case it
drops off a system:
$!
$! CRON_WATCHER.COM -- Monitors the CRON process on the "other" cluster
n
ode
$!
$ Set Noon
$ Set Noverify
$
$ Set Process/Name = "Cron_Watcher"
$ Assign/Process f$trnlnm("Site$Log") Sys$Scratch
$
$ Wait 00:15:00.00 ! Wait 15 minutes at startup to make sure CRON
w
as started
$
$ This_Node = f$edit("''f$getsyi("NODENAME")'", "UPCASE")
$
$ If This_Node .eqs. "NODE1"
$ Then
$ Other_Node = "NODE2"
$ Else
$ Other_Node = "NODE1"
$ Endif
$
$ Cron_To_Watch = "''Other_Node' CRON" ! All uppercase for
comparison
$
$START: ! Loop to here every
check
$ Ctx = ""
$ temp = f$context("PROCESS", Ctx, "NODENAME", "*","EQL")
$ temp = f$context("PROCESS", Ctx, "USERNAME", "*","EQL")
$LOOP:
$ Pid = "''f$pid(Ctx)'"
$ IF Pid .EQS. ""
$ Then
$ Gosub CRON_DOWN
$ Else
$ Process_Name = f$getjpi(pid,"PRCNAM")
$ If "''f$edit(Process_name, "UPCASE")'" .eqs. Cron_To_Watch
[SNIP]
Bunch of straight forward DCL. The other fellow took what I
wrote and made it his own, 100+ characters per line and mixed
case on the DCL. To each his own.
> Are there any others that would be worthy of note?
>
> This comes up often enough that maybe it oughtta be developed in a
> compiled language (C?). The gripe there, of course, is introducing
> security risks.
Support. It certainly would be very straightforward. As I mentioned
before, when COE tools show up, surely grab CRON and use it. Meaning
the effort may be temporary at best.
Rob
Anyway, The CRON.COM proc and the CRONTAB.DAT files
are, of course, fully protected. On the other hand,
I (the sysman) can of course specify any commanad file
to be run by CRON that is readable by SYSTEM. And
mosts jobs started by CRON are stared by "SUBMIT/USER=xxx",
so nothing (well apart from some backup scripts) is run
with elevated privs.
How does this "of course" intruduce security risks ?
Or is it the possible rewrite in C that do that ?
B.t.w, the one and only problem I'v had with the version I'm
running, was that after a couple of months, the CRON process
(detached running CRON.COM) the process died with some
exhausted quota. Looked like some memory leak !? Was solved
by an entry in the CRONTAB.DAT file where the CRON proc
is re-started. The second copy dies imeediatly if there is
already a copy running. The re-start is scheduled to run
5 min *after* the next whole hour, so it will always
be executed even if the CRON process crashes before the
re-start is done. I think this have gone away, CRON have been
up for 300+ days right now. (And the CRONTAB.DATA file has 14 entries
that gets evaluated each hour.)
$ sh proc/acc/id=1b07
28-JAN-2003 22:05:38.68 User: SYSTEM Process ID: 00001B07
Node: xxxxxx Process name: "Cron
Server"
Accounting information:
Buffered I/O count: 1051701 Peak working set size: 2304
Direct I/O count: 412474 Peak virtual size: 167296
Page faults: 3311248 Mounted volumes: 0
Images activated: 52234
Elapsed CPU time: 0 00:23:43.78
Connect time: 301 01:06:25.93
$
$ sh sys/noproc
OpenVMS V7.2-1 on node xxxxxx 28-JAN-2003 22:08:08.47 Uptime 302
06:02:01
$ sh proc/acc/id=1b07
Good enugh for me :-)
Jan-Erik Söderholm.
"David J. Dachtera" wrote:
>
> Please correct me here:
>
> I believe it was Rob Young that had a CRON.COM DCL proc. that could be
> kicked off as a detached process.
>
> Was this ever submited to Hunter Goatley's freeware archive? I don't see
2> it listed.
I added a "watch" to CRON by adding this line to the CRONTAB fil :
* * * * submit/nolog/user=system util:[cron]cron_restart.com
CRON_RESTART.COM containes just one line :
$ subm/nolog/user=system/after="+01:05:00" util:[cron]cron_startup
In this way, CRON can never crash such as it will not
be restarted automaticly after 5 minutes.
But, of course, this is the "hour-only" version of CRON...
Jan-Erik Söderholm.
Boy, I could have sworn a number of years ago there existed a CRON for
VMS written in C... Looked in my archives and turned up nothing, but
I'm still sure it existed.
Not sure how CRON written in C (or other 3GL) would pose more security
risks than CRON written in DCL???
My take is that most large sites either invest in a batch management
application from one of the big 3rd party VMS vendors (the ones that are
still around), or rolled their own (like CRON.COM). We rolled our own.
One of the big omissions from VMS as far as I was ever concerned -- a
splendid batch system implementation (better than Unix as far as I'm
concerned), and no way to manage the jobs in it. I've still never
really completely accepted the Unix way of doing this because the VMS
way just seems too well engineered (of course). But no batch manager...
Chris
-----
Chris Olive
Systems Consultant
Raytheon Technical Services Corporation
Indianapolis, IN
email: olivec AT indy DOT raytheon DOT com
Jan-Erik Söderholm.
There is Kronos on the freeware CD:
http://www.openvms.compaq.com/freeware/freeware40/kronos/
--
ME
Posted by news://news.nb.nu
Never used it, but this was something Digital should never have promoted
as a layered product. Should have come with the system. But that was
the Digital way. (Examples abound.)
> B.t.w, the one and only problem I'v had with the version I'm
> running, was that after a couple of months, the CRON process
> (detached running CRON.COM) the process died with some
> exhausted quota. Looked like some memory leak !? Was solved
> by an entry in the CRONTAB.DAT file where the CRON proc
> is re-started.
That is why I have a watcher out there. This one
hasn't bombed in many months of uptime. It could
have very well been resource exhaustion. Which one?
Who knows (it was 5 years ago when it crashed, prior
version of VMS ,etc.).
If it ever crashes again, I want to see it.
By the way, if something is truly mission critical you
would have other checks and balances on it if running
out of cron (or any where/way you have it running).
Rob
There is a pseudo-cron out there, that has been VMS-ized. In
fact, the top two entries in groups.google.com -> comp.os.vms,
point to it:
http://groups.google.com/groups?selm=1993Jul6.184949.18904%40wega.rz.uni-ulm.de&output=gplain
Newsgroups: comp.os.vms
From: ORA...@rzmain.rz.uni-ulm.de (Framstag)
Subject: Re: Does VMS have a facility like unix's cron?
Date: Tue, 6 Jul 1993 18:49:49 GMT
CRON is a job scheduler for VMS for periodic tasks, inspired by the unix
crontab facility.
An example of a running CRON system:
$ cron list
31-JAN-1993 23:10:40 ( detached CRON-daemon: MAIN02::ORAKEL_CRON )
Jobname Times (m h d wd or d-h:m) Queue
------- --------------------------- -----
BACKUP 0 6 * * fast$batch
HAPPA 0 18 * 1-5 / 40 13 * 1-5 fast$batch
NEWS 30 18 * * fast$batch
CRON_CHECK 02:00 (Holding until 31-JAN-1993 23:22) fast$batch
O25 0:05 (Holding until 31-JAN-1993 23:13) spawn
USER 0:10 (Holding until 31-JAN-1993 23:15) spawn
> Not sure how CRON written in C (or other 3GL) would pose more security
> risks than CRON written in DCL???
If you had the source, probably not any more than a DCL version.
> One of the big omissions from VMS as far as I was ever concerned -- a
> splendid batch system implementation (better than Unix as far as I'm
> concerned), and no way to manage the jobs in it.
Sacrilege!
One of the big omissions from Unix as far as I was ever concerned -- a
splendid vi implementation (better than ed as far as I'm concerned), but
nothing for backups. dumping tar? You have got to be kidding me.
> I've still never
> really completely accepted the Unix way of doing this because the VMS
> way just seems too well engineered (of course). But no batch manager...
Tis true. But just as the Unix weenies have had to be creative
to overcome their OS limitations, there are a few pieces missing
from VMS and 3rd parties have filled the gaps, same for Unix.
Now arguably, no one on VMS should have to pay for a batch manager and
you don't have to. Kronos is decent (or so I've heard).
Rob
Maybe it has another name KRONOS
--
Peter "EPLAN" LANGSTOEGER
Network and OpenVMS system specialist
E-mail pe...@langstoeger.at
A-1030 VIENNA AUSTRIA I'm not a pessimist, I'm a realist
Oh, well if you wanna go THAT direction, than the omissions in Unix far
outweigh the few holes in VMS, sure. I'd completely agree there.
Backup is certainly one of them.
>>I've still never
>>really completely accepted the Unix way of doing this because the VMS
>>way just seems too well engineered (of course). But no batch manager...
>
>
> Tis true. But just as the Unix weenies have had to be creative
> to overcome their OS limitations, there are a few pieces missing
> from VMS and 3rd parties have filled the gaps, same for Unix.
All true.
>
> Now arguably, no one on VMS should have to pay for a batch manager and
> you don't have to. Kronos is decent (or so I've heard).
>
I wonder if Kronos is what I was thinking of, though again, I could have
sworn it was just called "CRON"... Anyway, no way for me to know at
this point.
Chris
(PS. Tried replying from two different email accounts to your private
email to me, Rob, but my reply bounced both times... 8( )
Another thing to watch out for with SUBMIT/AFTER is if you use
something like
$ SUBMIT/AFTER="''SOME_TIME_SYMBOL'" ....
If that symbol happens to be null for some reason, the job will start
right away! Probably not what you want, especially since this would
most likely be caused by a bug in your DCL command procedure. So make
sure that symbol isn't null."
Disclaimer: JMHO
Alan E. Feldman
Of course! Why didn't I think of this before?
$ SUBMIT/AFTER=&SOME_TIME_SYMBOL .... !
Example:
$ SH SYM NOSUCH
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
$ SUBMIT /AFTER=&NOSUCH NOTHING.COM
%DCL-W-VALREQ, missing qualifier or keyword value - supply all
required values
$
Yet another use for ampersand substitution!
[Sorry for replying to myself. Some of you see that as bad form. It
never bothers me when others do it, though, and I don't see anything
wrong with it.]
Disclaimer: JMHO &-)
Alan E. Feldman
I have a C-language cron which goes down to 1-minute resolution. Been
using it for years. It seems to have originated in an article in some
HP-specific magazine, but it got ported to VMS. When I first put it in I
needed to spend a couple of minutes thinking; the assumption seemed to be
that the cron$lib directory where everybody's cron entries would be placed
were going to be world-writeable, which was wide open for anybody to write
entries to be executed on their behalf by system. So I ended up installing
the crontab program with privileges (subsystem identifiers not yet having
been invented at that time) and making the cron$lib directory not writable
without privileges, which seemed reasonably safe.
I'm not sure where I originally got the program, though. It was called
mycron. I hear KRONOS is good but haven't used it.
-- Alan
===============================================================================
Alan Winston --- WIN...@SSRL.SLAC.STANFORD.EDU
Disclaimer: I speak only for myself, not SLAC or SSRL Phone: 650/926-3056
Paper mail to: SSRL -- SLAC BIN 99, 2575 Sand Hill Rd, Menlo Park CA 94025
===============================================================================