- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- HPE 9000 and HPE e3000 Servers
- >
- Re: Crontab
HPE 9000 and HPE e3000 Servers
1753336
Members
4694
Online
108792
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-16-2005 07:12 PM
тАО01-16-2005 07:12 PM
Crontab
Hi
is there anyway to run a process one day before the last date of every month using crontab. if so please guide me .
is there anyway to run a process one day before the last date of every month using crontab. if so please guide me .
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2005 08:42 PM
тАО01-16-2005 08:42 PM
Re: Crontab
Hi,
Found this answer from Craig Rants in
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x026250011d20d6118ff40090279cd0f9%2C00.html&admit=716493758+1105954821099+28353475
---
There is not much to it, but it always solves the problem of running a script on the last day of the month. Put 28-31 (for days) in your crontab and put this little section in for date determination.
#!/bin/sh
if test `TZ=MET-24 date +%d` = 01
then
exec command
else
exit 1
fi
---
Hope this helps,
Robert-Jan
Found this answer from Craig Rants in
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x026250011d20d6118ff40090279cd0f9%2C00.html&admit=716493758+1105954821099+28353475
---
There is not much to it, but it always solves the problem of running a script on the last day of the month. Put 28-31 (for days) in your crontab and put this little section in for date determination.
#!/bin/sh
if test `TZ=MET-24 date +%d` = 01
then
exec command
else
exit 1
fi
---
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2005 08:49 PM
тАО01-16-2005 08:49 PM
Re: Crontab
Hi,
a potentially easier, but not 100% accurate way would be to create 3 entries along the lines:
01 0 30 Jan,Mar,May,Jul,Aug,Oct,Dec * ./command.sh
01 0 29 Apr,Jun,Sep,Nov * ./command.sh
01 0 27 Feb * ./command.sh
This will not allow for leap years.
a potentially easier, but not 100% accurate way would be to create 3 entries along the lines:
01 0 30 Jan,Mar,May,Jul,Aug,Oct,Dec * ./command.sh
01 0 29 Apr,Jun,Sep,Nov * ./command.sh
01 0 27 Feb * ./command.sh
This will not allow for leap years.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2005 01:11 AM
тАО01-25-2005 01:11 AM
Re: Crontab
ramkumar,
which solution did you go for in the end. Is this still a pronblem? If not can you please assign points and close the thread.
Thanks
which solution did you go for in the end. Is this still a pronblem? If not can you please assign points and close the thread.
Thanks
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP