- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: run a job each 15 minutes
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
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
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
01-15-2016 07:09 AM
01-15-2016 07:09 AM
run a job each 15 minutes
Hi
Reading about openvms, there is a DCL scripting language and submit command similar to crontab in unix.
that i want is create a bash.com to get the datetime "ps time", each 15 minutes. it job alway write into the same file.
myshell.com
output="/dir/file.txt"
$OUTPUT "ps time""
exit
cron
*/15 * * * * submit myshell.com
I appreciate your comments
thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2016 08:56 AM
01-15-2016 08:56 AM
Re: run a job each 15 minutes
You're on OpenVMS, not Unix. No cron. No ps command, either. As you've noticed, things work very differently.
For ps, SHOW PROCESS or SHOW SYSTEM, depending on what you're up to, or use a DCL loop and lexical functions. (There are various examples of DCL loops around — some look through a directory, and show the basic structure, but you'll be using f$getjpi or f$getqui or some other lexical, if you're looking for something that ps might display.)
As for scheduling, you can either scrounge and install a cron tool, or acquire and install a commercial job scheduler, or can use the hack that many of us do and use periodic batch resubmissions, or — for something as short as fifteen minutes — just leave the procedure running and WAIT.
Writing the same filename doesn't work the same on OpenVMS as it does on Unix, either. You'll accumulate versions, unless you manage that explicitly in the procedure, or via SET FILE or SET DIRECTORY with the /VERSION_LIMIT setting.
If you're more at home in bash as it appears (and depending on exactly what you're up to), then you might be better served by installing GNV and writing scripts there. That's a mostly-faithful bash shell for OpenVMS, with many of the common bash shell commands. There is a port of ps available in GNV, but AFAIK no cron analog.
These HPE forums are pretty weak and are difficult to search and navigate — searching the archives of the comp.os.vms newsgroup will likely provide you with more than a little insight into what's available and how (and the content there goes back decades), or get a few news server account at Eternal September and a newsreader and post to comp.os.vms from there, or use the Google Groups interface to post..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2016 08:59 AM
01-15-2016 08:59 AM
Re: run a job each 15 minutes
> cron
> */15 * * * * submit myshell.com
VMS lacks a "cron"-like scheduler. The usual alternative method is
the self-resubmitting batch job. See, for example:
http://community.hpe.com/t5/x/x/m-p/6435726
For some date-time basics: HELP DATE_TIME
A delta time like "+0:15:00" is easy to use, but that tends to drift
forward. You may need to do some fiddling around to get non-drifting
15-minute intervals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2016 03:02 PM
01-16-2016 03:02 PM
Re: run a job each 15 minutes
I would tend to use the same procedure that loops as Hoff suggests in the first reply. The reasoning for this is:
1) The loop would avaoid all process creation and deletion required for each periodic job.
2) A loop that calculates the time remaining until the next interval, will prevent the drift that Steve mentioned in the 2nd reply.
3) A single procedure looping can either leave the log file open and add lines only closing the file on "completion", or it can open and close the file as needed inside the wait loop.
There should be plenty of examples of how to create a loop as well as the handling of delta times.
Dan