Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-31-2009, 09:14 AM
|
#1
|
Member
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273
Rep:
|
backup laptop with rsync: online check
Hi!
I am writing my own anacron script that backs up my most important files from my laptop to my office pc regularly using rsync. However, sometimes my laptop is on when anacron starts the back-up job but my laptop is offline, so that it cannot rsync with my desktop. Is it possible to tell anacron to re-schedule the task to either the next time I'm online again or to some later date (preferably not the next scheduled time, but some time before)?
Thanks.
|
|
|
12-31-2009, 09:21 AM
|
#2
|
Member
Registered: Jun 2007
Location: PA
Distribution: FreeBSD, Ubuntu, Knoppix,
Posts: 41
Rep:
|
You could possibly tell it to sleep, say, 1 hour and then try again.
Syntax for the sleep command is here:
http://ss64.com/bash/sleep.html
|
|
|
01-01-2010, 06:07 AM
|
#3
|
Member
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273
Original Poster
Rep:
|
Thought about that one, but the problem is that I'm sometimes in the train working without being online, so that the sleep command would not help very much, because afterwards it's switched off again. Thanks, though.
|
|
|
01-01-2010, 06:36 AM
|
#4
|
Member
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183
Rep:
|
you could have the script touch a file when it completes, then schedule the cron job to run every 5 minutes, but not to do anything unless the file you touched is more than n hours old.
|
|
|
01-01-2010, 07:10 AM
|
#5
|
Member
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273
Original Poster
Rep:
|
Thanks, I'll try that one!
|
|
|
All times are GMT -5. The time now is 07:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|