- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Better scheduler than cron?
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
11-13-2001 01:10 PM
11-13-2001 01:10 PM
Has anyone ever tried to do this? I would appreciate any suggestions.
Thanks,
Tim
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:15 PM
11-13-2001 01:15 PM
SolutionTry the 28-31 days for cron and use this in the head of your script.
if test `TZ=MET-24 date +%d` = 01
then
"execute command"
else
"don't execute command"
fi
This should solve your problem.
Good Luck,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:18 PM
11-13-2001 01:18 PM
Re: Better scheduler than cron?
suggest you to live with the cron. It is a difficult proposition to schedule a cronjob on the last day of each month through cron, but you can get away with a few entries in place of 12. you need 3 entries, one for months with 31 days, one for month with 30 days and one for feb 28/29 days.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:20 PM
11-13-2001 01:20 PM
Re: Better scheduler than cron?
http://www.tivoli.com/products/index/workload_sched/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:31 PM
11-13-2001 01:31 PM
Re: Better scheduler than cron?
Craig, that is a great solution! It took me a few minutes to figure out what you are doing, but now I understand it.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:33 PM
11-13-2001 01:33 PM
Re: Better scheduler than cron?
For scheduling software, you can check Tidal software''s sysadmiral. We used it in an earlier site.
Another choice is BMC''s control-m
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 01:43 PM
11-13-2001 01:43 PM
Re: Better scheduler than cron?
I would use my caljd.sh script to do this:
Your cron script should look somethinh like this:
#usr/bin/sh
export PATH=${PATH}:/usr/local/bin
if [ "$(caljd.sh $(caljd.sh) | awk '{print $1}')" != "$(caljd.sh -n 1) | awk '{print $1}')" ]
then
echo "Run It"
fi
You could simply make a cron entry to run every day and the above script will take care of it. It simply looks for when the $1 (month) output of today is different from that of the next day (-n 1). I would install caljd.sh in /usr/local/bin. If you want to see how this insane caljd.sh script works, just do a caljd.sh -u for full usage.
P.S. I hope I got all those pesky quotes above correct.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2001 03:54 PM
11-13-2001 03:54 PM
Re: Better scheduler than cron?
I'm an idiot. I missed a $(cvaljd.sh) call. It should look like this:
PATH=${PATH}:/usr/local/bin
export PATH
if [ "$(caljd.sh $(caljd.sh) | awk '{print $1}')" != "$(caljd.sh $(caljd.sh -n 1) | awk '{print $1}')" ]
then
echo "Month Changed"
else
echo "Month Same"
fi
The real advantage is that this method makes it very easy to run n days before the last day of the month (or only on weekdays and skip holidays with just a few more caljd.sh options)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2002 10:51 PM
01-14-2002 10:51 PM
Re: Better scheduler than cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2002 01:39 PM
01-15-2002 01:39 PM
Re: Better scheduler than cron?
This code should work as well.
if [ `cal | tail -2 | head -1 | awk '{ print $NF }'` -eq `date | awk '{ print $3 }' ]; then
execute the code
fi
Hai