Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2005 15:22:07 -0500 (EST)
From:      "Ean Kingston" <ean@hedron.org>
To:        "Doug Poland" <doug@polands.org>
Cc:        questions@freebsd.org
Subject:   Re: copying cron files between computers
Message-ID:  <3575.216.220.59.169.1110572527.squirrel@216.220.59.169>
In-Reply-To: <20050311200223.GG29367@polands.org>
References:  <20050311200223.GG29367@polands.org>

next in thread | previous in thread | raw e-mail | index | archive | help

>
> 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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"
>


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3575.216.220.59.169.1110572527.squirrel>