LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-22-2014, 11:51 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
How to cancel two cron'd rsync that are running at same time, or can they both run ok


OK, we have a scheduled cron job that runs an rsync command for us. Someone manually kicked off the cron job via webmin, but then the scheduled one also kicked off while that one was still running.

My question is, how can I kill one of them since they're doing the exact same thing? Or are they both safe trying to rsync the same data? Seems like you wouldn't want to run the same rsync command twice like that, as it might cause issues?
 
Old 04-22-2014, 12:30 PM   #2
linxpatrick
Member
 
Registered: Oct 2010
Posts: 32

Rep: Reputation: 1
Since the rsync is doing the same thing I don't think you want them running together. Besides having no need to run two of the same rsync processes there is a possibility of a conflict if the same file is being written by both processes.

Use the following link to figure out the PID for the rsync process that you wish to kill and the correct command to kill it. I don't believe you would need, or should to kill the cron process because.

http://www.cyberciti.biz/faq/kill-pr...linux-systems/
 
1 members found this post helpful.
Old 04-22-2014, 01:59 PM   #3
deathsfriend99
Member
 
Registered: Nov 2007
Distribution: CentOS 6
Posts: 200

Rep: Reputation: 22
I would kill them both. The rsync command has an 'update' switch so it will continue where it left off. That way you know rsync isn't spinning it's wheels.
 
1 members found this post helpful.
Old 04-23-2014, 09:23 AM   #4
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks for the help guys.
 
  


Reply



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
[SOLVED] cron job - run a backup then rsync results to mounted drive lukester Linux - Newbie 8 03-28-2012 06:53 PM
rsync not running in cron job; please help Ravishankarappa Linux - Newbie 8 08-17-2011 12:11 PM
What time do the scripts in /etc/cron.daily run? abefroman Linux - Server 3 01-06-2010 03:01 PM
How can I retrieve the next run time of a cron vincentgagnoncoll Linux - Newbie 3 06-15-2009 04:06 PM
how can i run rsync as a cron job using public keys authentication disorderly Linux - Server 14 03-13-2008 09:51 PM

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

All times are GMT -5. The time now is 03:05 PM.

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