#1
|
|||
|
|||
Scheduling a backup on just one day a month
Hi again,
For one of my backups I only want it to run once a month. So yesterday I setup the schedule to copy every 1st week on Sunday at 4:00 am. When I opened the Schedule window today (to check that other backups had run on time) I noticed that the monthly backup had already run, despite not being Sunday ('Last Copy' entry says Thursday December 1st). The 'Next Copy' part correctly says Sunday December 4th. So I ran 'crontab -l' to see what the crontab file was reporting and the date & time part of the entry says: 0 4 1-7 * 0 I think this is where the problem lies. According to my understanding, cron will run jobs when the time field is matched and *one* of the day/month fields is correct. So I think it will run every Sunday *and* on each of the first seven days of the month. So I'm not sure if this is something that needs to be dealt with? Regards, Keith |
#2
|
||||
|
||||
I've got code in the AppleScript that runs when the crontab fires that's supposed to change the "or" implied in a crontab into an and, Keith, so it should have worked properly: at least, I haven't noticed problems here.
But, that said, "4" isn't "Sunday" -- it's Wednesday, which would make the operation correct. Are you sure you selected "Sunday"?
__________________
--Dave Nanian |
#3
|
|||
|
|||
Just double checked and the schedule is set for Sunday not Wednesday. Let me see if it runs tomorrow or not, and I'll get back to you.
Keith |
#4
|
||||
|
||||
My fault -- I misread the crontab entry you posted, Keith.
__________________
--Dave Nanian |
#5
|
|||
|
|||
Ok, so I checked first thing this morning and my 'monthly' backup had run again. The 'Next Copy' field is still unchanged saying Sunday December 4th.
I'd wager that this backup will run each day until the 8th and then stop again until the first. Any thoughts on whether you think this is a glitch at my end with something that I've done wrong, or a glitch in your applescript that changes the cron 'or' functionality into an 'and'. If you like, I'm prepared to let this backup run for another week to test my hypothesis :-) Regards, Keith |
#6
|
||||
|
||||
Instead, set up a single scheduled item for sunday at about three minutes from now, just like the other one. Does it mysteriously run?
If so, please send your Crontab contents to the support address. I'd like to see what I can see in there, maybe there's a weird case I'm not handling in the script.
__________________
--Dave Nanian |
#7
|
|||
|
|||
Good idea Dave (much smarter than my idea!).
I just tried this and lo and behold the backup started even though I specified to only run on the 1st Sunday. I'll email the offending crontab entry to you. Regards, Keith |
#8
|
||||
|
||||
Cool, Keith -- thanks.
__________________
--Dave Nanian |
#9
|
||||
|
||||
OK. I'm pretty sure I know what's going on here, and -- if you're running into it -- here's how to fix:
This fix will be in 2.0.2, when released.
__________________
--Dave Nanian |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sparse image from aborted DMG backup? | Winston | General | 9 | 10-22-2005 12:28 PM |
Request for help with an AppleScript to run two SD SmartUpdates | emikysa | General | 2 | 10-13-2005 12:10 PM |
(Zero-length) File caused SuperDuper to abort backup | alancfrancis | General | 7 | 08-31-2005 10:42 AM |
automatic initiation of backup when I plugin/mount my external Firefox drive? | mykmelez | General | 3 | 07-11-2005 03:00 PM |
Smart Backup Error | bill s | General | 20 | 02-04-2005 09:46 AM |