Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-12-2008, 09:18 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 15

Rep: Reputation: 0
Cron'd rsync process out of control.

Greetings Gurus,
My desktop machine is a 64 bit version of Ubuntu 8.04.1, 2.6.24-21 kernel and using rsync version 2.6.9 protocol version 29.

I recently added a 1Tb drive to the setup (XFS) to handle backups.
I tossed the rsync command;
rsync -avh --progress --delete --exclude-from=/root/.rsync/exclude /home /media/sdc1/
into a file and scheduled it to run once a day at 5am via;
# m h  dom mon dow   command
* 5 * * * /root/.rsync/.homes_sync>/dev/null 2>&1
Everything seems to work fine though once in a while (once every two weeks or so), I'll wake up and there will be +30 instances of rsync running bogging down the system.
I look at my logs and;
Nov 12 05:00:01 Balius /USR/SBIN/CRON[18858]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:01:02 Balius /USR/SBIN/CRON[21872]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:02:02 Balius /USR/SBIN/CRON[24874]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:03:02 Balius /USR/SBIN/CRON[27890]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:04:02 Balius /USR/SBIN/CRON[30920]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:05:02 Balius /USR/SBIN/CRON[1464]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:06:02 Balius /USR/SBIN/CRON[4488]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:07:07 Balius /USR/SBIN/CRON[7678]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:08:01 Balius /USR/SBIN/CRON[10693]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
Nov 12 05:09:11 Balius /USR/SBIN/CRON[13718]: (root) CMD (/root/.rsync/.homes_sync>/dev/null 2>&1)
. . . .and so on until 5:59am.

My question is A.Is my job not scheduled correctly and B.If it is, why does this only happen once in a while?

I would think that if the scheduling is incorrect, it may run every 5 hours or every 5 min, but once a min for an hour?

My apologies if this is obvious.
Old 11-12-2008, 09:28 PM   #2
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
If you notice that you have your crontab set to run every minute from 5:00 a.m.
# m h  dom mon dow   command
* 5 * * * /root/.rsync/.homes_sync>/dev/null 2>&1
The * in the minute specification runs every minute during the 5 o'clock hour.

If you want to execute your command once you must specify a single time such as:
# m h  dom mon dow   command
0 5 * * * /root/.rsync/.homes_sync>/dev/null 2>&1
This will run your command only once at 5:00 a.m. daily.
# m h  dom mon dow   command
30 5 * * * /root/.rsync/.homes_sync>/dev/null 2>&1
This will run your command only once at 5:30 a.m. daily.

Last edited by AuroraCA; 11-12-2008 at 09:32 PM.
Old 11-12-2008, 09:30 PM   #3
LQ Newbie
Registered: Oct 2005
Posts: 15

Original Poster
Rep: Reputation: 0
I've edited the cron entry hopefully that'll be the end of it.


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
time control process sunlinux Programming 4 12-16-2006 08:44 PM
Process Table-Process Control Block sarahmencer Linux - General 1 01-09-2006 09:14 PM
Process control...? kleptophobiac Linux - General 2 09-25-2004 10:03 AM
Regaining Process Control mikeyt_333 Linux - General 5 03-21-2002 02:21 PM
apache, process owner, and rsync/ssh question Kruel Linux - Networking 0 03-01-2002 12:25 PM

All times are GMT -5. The time now is 09:48 PM.

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