- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Problem requeing a batch job
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
Forums
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
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
12-15-2006 01:29 AM
12-15-2006 01:29 AM
I have this batch job that only supposed to runs from Sunday through Thursday, skips the weekend. In my batch job, I have s section where it was checking for the day "THU" skip to the skip_weekend: prompt. However, it's not working like I thought it would do. Can someone direct me to the right commands.
$ wkday = f$edit(f$extract(0,3,f$cvtime("today",,"weekday")),"upcase")
$ if (wkday .eqs. "THU") then goto SKIP_WEEKEND
Thank you in advance.
Jorge
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 01:43 AM
12-15-2006 01:43 AM
SolutionBut, why make it complicated?
$ wkday = f$cvt(,,"weekday")
$ if wkday .eqs. "Thursday" then goto skip_weekend
should work just as well.
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 05:35 AM
12-15-2006 05:35 AM
Re: Problem requeing a batch job
If a cluster node is even a fraction of a second different than where the queue manager runs - then you are technically running it the day before.
Why not check if Day = Fri or Sat then goto skip weekend?
Your script currently looks like it will only skip if day = Thursday. That might be related to when to resubmit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 07:37 AM
12-15-2006 07:37 AM
Re: Problem requeing a batch job
Thanks,
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 09:20 AM
12-15-2006 09:20 AM
Re: Problem requeing a batch job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 09:28 AM
12-15-2006 09:28 AM
Re: Problem requeing a batch job
Cheers!!
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 02:52 AM
12-19-2006 02:52 AM
Re: Problem requeing a batch job
Thank you!!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ set noverify
$ ON ERROR THEN GOTO EXIT
$ SET NOON
$ Set Proc/Priv=bypass
$!
$ wkday = f$cvt(,,"weekday")
$ if wkday .eqs. "Friday" then goto skip_weekend
$!
$ submit/user=backups/que=backups$batch -
disk5:[backups.com]full_backup.com -
/log=disk5:[backups.log]full_backup.log -
/after="tomorrow+15:00:00" /noprint
$!
$ Go To Begin
$ SKIP_WEEKEND:
$ submit/user=backups/que=backups$batch -
disk5:[backups.com]full_backup.com -
/log=disk5:[backups.log]full_backup.log -
/after="tomorrow+1-15:00:00" /noprint
$!
$ BEGIN:
$ set proc/name="Daily_Full_Backup"
$!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 03:21 AM
12-19-2006 03:21 AM
Re: Problem requeing a batch job
Place the following immediately before the BEGIN label
$ goto exit
This is of course assuming that you have an EXIT label.
Also, I notice that you set an on error condition at the begining and then turn it off (set noon). Remove the "$ SET NOON" line.
However, you still have not corrected the problem that Peter mentioned. You are only checking for one day (Friday). When this runs on Saturday or Sunday, it will fail the check and not skip weekend.
Ideally, I would change your check to if Day = Saturday or Sunday then goto skip weekend.
Doug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 03:26 AM
12-19-2006 03:26 AM
Re: Problem requeing a batch job
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ set noverify
$ set noon
$ set proc/priv=bypass
$!
$ submit/user=backups/que=backups$batch -
disk5:[backups.com]full_backup.com -
/log=disk5:[backups.log]full_backup.log -
/after="tomorrow+15:00:00" /noprint
$!
$ if f$extr(0,1,f$cvti(,,"weekday")) .eqs. "S" then exit
$!
$BEGIN:
$ set proc/name="DailyFullBackup"
$!
Note that your process name was too long - 15 characters is the maximum and that unless you're issueing a later "SET ON" your "ON ERROR" trapping will never be activated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 07:08 AM
12-19-2006 07:08 AM
Re: Problem requeing a batch job
Thank you so much!!
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 07:18 AM
12-19-2006 07:18 AM
Re: Problem requeing a batch job
What would be the syntax setting this way?
Thanks,
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 07:28 AM
12-19-2006 07:28 AM