- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Submiting a batch job to run automatically twice a...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 08:07 AM
тАО03-27-2008 08:07 AM
Re: Submiting a batch job to run automatically twice a year
and from time to time update the command file.
You do not need to resubmit it, just do, if your command file is a.com, after modfying it
from a.com;1 to a.com;2
$ copy/overlay a.com;2 a.com;1
and the "new" a.com will be used for the next submit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 10:26 AM
тАО03-27-2008 10:26 AM
Re: Submiting a batch job to run automatically twice a year
Indeed, I mis-spoke[sic].
The second Friday of the month ranges from the 9th (when the month starts on a Thursday), to the 15th (when the month starts on a Friday).
(smile) Obviously, one needs to exercise caution when dealing with the fourth and fifth weeks of the month.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 12:49 PM
тАО03-27-2008 12:49 PM
Re: Submiting a batch job to run automatically twice a year
My apologies, this does not seem to be my day for calendars.
The lowest day of month for the "second Friday" is the 8th (if the month starts on the previous Friday). The highest day of month is the 14th (if the month started on a Saturday).
My apologies for the errata.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 12:54 PM
тАО03-27-2008 12:54 PM
Re: Submiting a batch job to run automatically twice a year
The "trick" to get the last day of the month is to use "one day before the start of the next month", to wit:
$ LASTDATE = F$CVTIME("1-MAR-2008-1-0",,"DATE)
Yields 29-Feb-2008. Note that this automatically deals with leap years.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 05:13 PM
тАО03-27-2008 05:13 PM
Re: Submiting a batch job to run automatically twice a year
As others have suggested, I find you're much better off having the job execute frequently (daily is easiest) and checking on each run if there's anything to be done.
A few tricks to make coding easier and clearer...
For a job that should do something each week day:
$ SUBMIT self for tomorrow
$ GOTO 'F$CVTIME(,,"WEEKDAY")
$
$ Saturday:
$ Sunday:
$ EXIT
$
$ Monday:
$ Tuesday:
$ Wednesday:
$ Thursday:
$ Friday:
$ ! Do work here
Obvious modifications for doing different things on specific weekdays.
For first of the month:
$ IF F$CVTIME(,,"DAY").EQS."01"
$ THEN
$ ! Today is first of month
$ ENDIF
For last day of month
$ IF F$CVTIME(,,"MONTH").NES.F$CVTIME("+1-",,"MONTH")
$ THEN
$ ! Today is last day of month
$ ENDIF
For a calendar of arbitrary dates, store them in a file:
$ PIPE SEARCH ACTION_DATES.DAT "''F$CVTIME(,"ABSOLUTE","DATE")'" >nl: 2>nl:
$ IF $SEVERITY.EQS."1"
$ THEN
$ ! today is listed in ACTION_DATES.DAT
$ ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 09:38 AM
тАО04-01-2008 09:38 AM
Re: Submiting a batch job to run automatically twice a year
I want to be able to execute a job that will check for a certain date and if it is that date to submit it automatically.
Let's say i want this job to run on the 2nd week on a particular day {tuesday) in June and then again in Decemember?
Is there a simple DCL command to do this, without making it too complicated!
Ex.
Maybe something that says
if today is the 14th of june or Decemeber and the day is tuesday then submit this job?
Something to that effect?
Just want somethinmg simple if at all possible.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 10:01 AM
тАО04-01-2008 10:01 AM
Re: Submiting a batch job to run automatically twice a year
Perhaps, but I doubt it.
> [...] check for a certain date [...]
I think that that's been provided already.
> Let's say i want this job to run on the 2nd
> week on a particular day {tuesday) [...]
No problem. Define "2nd week".
> Just want somethinmg simple if at all
> possible.
A clear, unambiguous description of the
problem can be a big help. I haven't seen
one yet. Some thought may be required. Get
used to it. If you can't specify the problem
clearly enough for someone else to do your
job for you, then you may need to do some
playing around with the suggestions you get,
to see if you can adapt the concepts to
whatever it is that you actually want to do.
Am I being too grumpy again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 06:44 AM
тАО04-03-2008 06:44 AM
Re: Submiting a batch job to run automatically twice a year
Am I missing something?
$ if (f$search("steve_ward:'node'_ward.com") .eqs. "")
$ then
$ write sys$output "WARD.COM file missing! Program will NOT run."
$ goto the_end
$ else
$ SUBMIT/NOPRINT/QUE=SYS$BATCH/LOG=STEVE_WARD:[000000]'node'_WARD.COM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 07:07 AM
тАО04-03-2008 07:07 AM
Re: Submiting a batch job to run automatically twice a year
>>>
if (f$search("steve_ward:'node'_ward.com") .eqs. "")
<<<
Is this an exact copy/paste, or a nearly accurate attempt to re-type?
It SHOULD be (and for clarity I added spaces, which do NOT belong!)
if (f$search(" steve_ward: ' ' node ' _ward.com") .eqs. "")
Notice: Between double quotes, you need TWO apostrophes to begin synbol substitution, and one to end it.
And why do you f$search
"steve_ward:'node'_ward.com")
but if you find it, you SUBMIT
>>>
STEVE_WARD:[000000]'node'_WARD.COM
<<<
It will work a lot better of you SUBMIT STEVE_WARD:'node'_WARD.COM
Explanation:
In the search, STEVE_WARD obviously is a logical name for a directory (or you would not find anything)
But in STEVE_WARD:[000000] you specify a DEVICE )potentially a Concealed Device) named STEVE_WARD; which has a top-directory [000000] (for concealed devices that would be the pseudo directory, pointing to the root level itself), where the .COM file should reside.
But, STEVE_WARD can NEVER be simaultabiously both a Device spec AND a Directory-spec.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 07:08 AM
тАО04-03-2008 07:08 AM
Re: Submiting a batch job to run automatically twice a year
>>>
simaultabiously
<<<
read that as simultanously
Proost.
Have one on me.
jpe