intechfs
asked on
How do I run RSYNC every 5 minutes, in serial mode?
Hello,
i have a question about rsync and a cron job to run the every 5 minutes.
The problem i have it that each time rsync runs, it starts a new instance and after a couple of hours i end up with a unusable system due to the number of rsync processes running in paralell.
What i need is a way to force rsync to run in serial (one at a time), checking if an existing instance is running, and if that is the case it will not re run.
I need the script to run on this frequency because i have alot of changing data, and i want to keep the local and remote system synchronised as often as possible.
I may be looking at this problem in the wrong way, and help would be much apreciated.
thankyou!
i have a question about rsync and a cron job to run the every 5 minutes.
The problem i have it that each time rsync runs, it starts a new instance and after a couple of hours i end up with a unusable system due to the number of rsync processes running in paralell.
What i need is a way to force rsync to run in serial (one at a time), checking if an existing instance is running, and if that is the case it will not re run.
I need the script to run on this frequency because i have alot of changing data, and i want to keep the local and remote system synchronised as often as possible.
I may be looking at this problem in the wrong way, and help would be much apreciated.
thankyou!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
In the 2nd script I did not put sleep to make it simple