Link to home
Start Free TrialLog in
Avatar of Tolgar
Tolgar

asked on

How can I copy a cron file from one machine to another machine?

Hi,
I have two Unix machine. I want to copy (rsync) the cron file from one machine to another.  

How can I do that?

and

Is it secure to do it?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just copy the contents of the crontab file from one server to another.  It is usually located under /var/spool/crontabs.
sorry I misread the question; listen to wool
And how should cron recognize that there's a new crontab now?
Depending on your flavor of Linux/Unix it should check in every so often but you could use

crontab -e

or

/etc/init.d/crontab stop && /etc/init.d/crontab start
So if you must issue a command like crontab on the target system anyway - why not use it on both ends?

It's consistent and compatible with almost all Unix flavors (well not with ESX(i) but that's another question).

wmp
I'm not sure why you are trying to argue with me but if you read above I said I misread the question and to ignore my response.  Please help the person asking the question instead.