- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Upload data every nine weeks?
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
02-04-2003 11:56 AM
02-04-2003 11:56 AM
I have a requirement to automatically upload some data files to a remote server every 9 weeks (on a Monday at 8 AM) . I can't find a combination of crontab entries that will do this. I haven't wriitten the upload script but my problem now is simply getting cron to run anything on a nine-week interval.
Any ideas out there?
Thanks in advance for your time,
Neil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:00 PM
02-04-2003 12:00 PM
Re: Upload data every nine weeks?
Once you run it the first time you could schedule it via 'at' to run again in 63 days.
Something like this:
at now + 63 days < /dir/script_to_run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:00 PM
02-04-2003 12:00 PM
Re: Upload data every nine weeks?
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xce7187dc4d7dd5118ff00090279cd0f9,00.html
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:03 PM
02-04-2003 12:03 PM
SolutionSomething like this:
#!/usr/bin/sh
PATH=${PATH}:/usr/local/bin
export PATH
typeset -i WK=$(( (($(caljd.sh) + 1) / 7) % 9 ))
if [[ ${WK} -eq 0 ]]
then
echo "Run Your Script"
else
echo "Do nothing"
exit 0
fi
The + 1 offset is used to make the weeks start on Sunday. We then divide by 7 to get the week number and then a mod 9. You may need to change the -eq 0 to some other value between 0 and 8 to do correct week. The advantage of this method is that it is going to work year-in, year-out without any changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:07 PM
02-04-2003 12:07 PM
Re: Upload data every nine weeks?
No points for this, please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:23 PM
02-04-2003 12:23 PM
Re: Upload data every nine weeks?
Thanks again,
Neil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:29 PM
02-04-2003 12:29 PM