How do I schedule FOG image replication for after hours?
-
I’m on CentOS 7 using FOG 1.5.0. Can anyone tell me how to schedule image replication for after hours? It’s killing our daytime bandwidth to have it replicate to so many storage nodes during work hours. I’ve read that I need to use a cron job to start the service and then another cron job to stop it. Can anyone tell me the exact Linux commands to do this? I’m a Windows guy and this particular Linux command is evading me.
-
@kafluke I would start here and review this document the cron schedule is pretty powerful, but very cryptic. https://en.wikipedia.org/wiki/Cron
Once you are totally lost you can start with this process.
Switch over to the root account by issuing this command at the linux command prompt.
sudo su -
Then edit the crontab (the config file that manages cron) with
crontab -e
once in the crontab editor you might put something in there like this (don’t blindly copy and paste it in, really understand what its doing)0 7 * * * systemctl stop FOGImageReplicator 0 18 * * * systemctl start FOGImageReplicator
-
@kafluke Currently, the only way to do it is with cron jobs that start or stop the FOGImageReplicator.service Are you familiar with cron jobs?
-
@wayne-workman Thanks for the reply. Like I mentioned in my OP I don’t know how to make a cron job to do this but I’ll look into it further. Thanks for the info.
-
@kafluke I would start here and review this document the cron schedule is pretty powerful, but very cryptic. https://en.wikipedia.org/wiki/Cron
Once you are totally lost you can start with this process.
Switch over to the root account by issuing this command at the linux command prompt.
sudo su -
Then edit the crontab (the config file that manages cron) with
crontab -e
once in the crontab editor you might put something in there like this (don’t blindly copy and paste it in, really understand what its doing)0 7 * * * systemctl stop FOGImageReplicator 0 18 * * * systemctl start FOGImageReplicator
-
@george1421 thank you so much! These are even the exact times that I needed to set the job for! You da man! This can be marked resolved now.
-
@kafluke said in How do I schedule FOG image replication for after hours?:
@george1421 thank you so much! These are even the exact times that I needed to set the job for! You da man! This can be marked resolved now.
That is why I get paid the big bucks… oh wait… never mind.