copying cron files between computers

Ean Kingston ean at hedron.org
Fri Mar 11 12:21:46 PST 2005


>
> Hello,
>
> I'm want to keep the cron files between two 5.3-STABLE computers
> "synchronized".  From my reading on cron(8), crontab(1), and crontab(5),
> accomplishing this might be a little convoluted.
>
> Would something like this work?
>
> computer-A:
>
>     root# crontab -u joeuser -l > /usr/home/joeuser/cron
>
> get files from computer-A to computer-B
>
>
> computer-B:
>
>     root# crontab -u joeuser  /usr/home/joeuser/cron

It would work, but...

Cron stores it's files in /var/cron/tabs/. Each user has it's own file
(with the user's name). You can simply copy all (or some) of the files in
that directory over to the new location.

The biggest reason why you are not supposed to edit those directly is that
cron can have a bit of a fit if the file format is invalid. As long as it
was validated when it was first saved it should copy fine.

>
> As an alternative, would anyone suggest a cron replacement, like mcron?
> As I read it, mcron stores it's files in a users ~/.cron directory.
> Thereby eliminating the dump and read of each user's cron.
>
> Thanks for the help and suggestions.
>
> --
> Regards,
> Doug
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>


-- 
Ean Kingston
    E-Mail: ean_AT_hedron_DOT_org
 PGP KeyID: 1024D/CBC5D6BB
       URL: http://www.hedron.org/




More information about the freebsd-questions mailing list