LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-04-2011, 07:22 PM   #1
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Rep: Reputation: 22
cron.weekly Failure


I have a backup server which cannot seem to get through the process. It's running a standard script in /etc/cron.weekly, with a series of rsync commands to back up the various machines on my LAN, all running Debian Testing.

The first problem is that it always decides to trigger on Friday, one of the two worst days of the week it could choose. I have /etc/crontab set to:
01 10 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )

So why Friday? Why does every 7th day have to fall on a Friday?

The next problem is when it starts an rsync but fails (because it's Friday) it just silently quits. I want it to notify me by email if it craps out, but do not know how to make this in a script.

Can anyone advise?
 
Old 02-04-2011, 07:43 PM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Cron uses the convention where Sunday is day 0, Saturday is day 6. Day 7 is invalid.
 
Old 02-05-2011, 08:10 AM   #3
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
crontab comes with a 7 there out-of-the-box. I didn't change that.

Yet it's firing on Friday for some reason.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cron.hourly cron.weekly cron.monthly and 0anacron. Are they necessary? glore2002 Debian 2 09-30-2009 09:57 PM
cron.daily, cron.weekly not working mwhite74 Linux - Server 2 06-07-2007 10:51 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 02:50 PM
cron weekly does not run jordanthompson Linux - Software 21 01-16-2005 10:52 AM
Weekly Cron problem sopiaz57 Linux - General 2 11-15-2004 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration