[CDBUG-talk] Stupid question

James L. Lauser james at jlauser.net
Thu Sep 1 23:02:11 EDT 2016


crontab -e validates the syntax of the updated crontab before exiting and
will prompt you to fix it before installing it. visudo has a similar
feature for editing the sudoers file.

Pro tip: Don't edit the sudoers file directly on a machine on which you
don't have access to the root account. Syntax errors are a bad time.

I could be wrong on this, but I thought I remember someone telling me that
the crontab command also signals the running cron daemon that the tab has
changed so it immediately reloads. Otherwise cron won't reload the file
until the next time it runs something. This is important if you're trying
to schedule something to run before the next otherwise scheduled task.

On Thu, Sep 1, 2016 at 5:07 PM Dan Langille <dan at langille.org> wrote:

> > On Sep 1, 2016, at 3:45 PM, freebsd at fongaboo.com wrote:
> >
> >
> > On Thu, 1 Sep 2016, Patrick Muldoon wrote:
> >
> >>> On Sep 1, 2016, at 3:07 PM, freebsd at fongaboo.com wrote:
> >>>
> >>>
> >>> What is the difference between editing /etc/crontab and running
> crontab -e?
> >>
> >>
> >> /etc/crontab is system crontab
> >>
> >> crontab -e  edits the  user specific crontab, which is generally stored
> in /var/cron/tabs/${user}
> >>
> > I guess I knew that... But what are the differences/pros/cons to editing
> /etc/crontab vs. running crontab -e... AS ROOT??
> >
> >
>
> You may wish to use sudoedit instead of editing a file as root.
>
>
>
> _______________________________________________
> CDBUG-talk mailing list
> CDBUG-talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/cdbug-talk
>
-- 

--  James L. Lauser
    james at jlauser.net
    http://jlauser.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/cdbug-talk/attachments/20160902/af832ae4/attachment.html>


More information about the CDBUG-talk mailing list