- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: how to schedule a batch file
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
тАО10-15-2006 09:12 PM
тАО10-15-2006 09:12 PM
I need to write a command file that will run an FTP procedure at 03:00 every night. I have the procedure working
so far as I can get it to run immediately, but dont know how to schedule it for that time. I presume I will have to submit it to a batch queue, but can anyone suggest
how I schedule it to run at that time?
Thanks
Gerry
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2006 09:30 PM
тАО10-15-2006 09:30 PM
Solutionsimply add
$ SUBMIT
As (nearly) the first line in
There are (much) more elegant solutions around, that take the weekday in account, and all kinds of error handling, and conditional processing etc,
but basically, the above solves what you are asking.
hth
PS.
from your profile:
I have assigned points to 7 of 68 responses.
-one of those dates back to 2004.
Perhaps time to catch up?
Proost.
Have one on me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2006 09:32 PM
тАО10-15-2006 09:32 PM
Re: how to schedule a batch file
you use the /AFTER qualifier to specify the start time of a batchjob, e.g.
$ SUBMIT myproc /AFTER="TOMORROW+03:00:00"
You may place this command at the top of your procedure, e.g.
$ If F$MODE().eqs."INTERACTICE"
$ THEN
$ SUBMIT ...
$ EXIT
$ ELSE
$ SUBMIT..
$ ...! the actual work
$ ENDIF
To make the routine bulletproof you may add logic to check for an already submitted job...
Another way would be to use tools like CRON.
Search the forum, there was a recent thread about scheduling.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2006 10:59 PM
тАО10-15-2006 10:59 PM
Re: how to schedule a batch file
I concur with Jan and Karl.
I will add a note that you need to deal with the possibility of that either:
- the job may not resubmit itself; or
- multiple copies of the job being present
Once can get into these situations in various failure scenarios.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2006 01:00 AM
тАО10-16-2006 01:00 AM
Re: how to schedule a batch file
$ proc = f$environment("PROCEDURE")
$!remove version from procedure name, so that one can change the file and
$!activate the new version without canceling the job:
$ proc = proc-f$parse(proc,,,"VERSION","SYNTAX_ONLY")
$ write sys$output f$getqui ( "DISPLAY_QUEUE", "QUEUE_NAME", "*", "THIS_JOB" )
$ myqueue = f$getqui ( "DISPLAY_QUEUE", "QUEUE_NAME", "*", "THIS_JOB" )
$!resubmit this job to run TOMORROW MORNING
$ SUBMIT/AFTER="TOMORROW+3"/LOG/noprint/queue='myqueue' 'proc'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2006 03:13 AM
тАО10-16-2006 03:13 AM
Re: how to schedule a batch file
I usually just ask to use the highest version: ("proc" as in your example)
$ Proc = f$parse(";0",f$environment("procedure"))
If any related filespecs are needed, eg:
$ errfil = f$parse(".err;0",proc)
etc..
but that does not change the principle.
fwiw
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2006 03:28 AM
тАО10-16-2006 03:28 AM
Re: how to schedule a batch file
<< $ Proc = f$parse(";0",f$environment("procedure"))
There is a subtle difference vs. subraction the version from f$environment("procedure"):
your f$parse still gets a version number in the result. Now this usually makes no difference if it is used immediately afterwards. But if there is something (like generating a new version) in between, then it is not what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2006 07:34 PM
тАО10-16-2006 07:34 PM
Re: how to schedule a batch file
in fact the only difference is
"file;0" vs. "file" in the result.
So effectively no difference wether f$parse is followed immediatley by submit or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2006 09:57 PM
тАО10-16-2006 09:57 PM