<div dir="ltr">crontab -e validates the syntax of the updated crontab before exiting and will prompt you to fix it before installing it. <span style="line-height:1.5">visudo has a similar feature for editing the sudoers file.</span><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">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.</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">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.</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 1, 2016 at 5:07 PM Dan Langille <<a href="mailto:dan@langille.org">dan@langille.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Sep 1, 2016, at 3:45 PM, <a href="mailto:freebsd@fongaboo.com" target="_blank">freebsd@fongaboo.com</a> wrote:<br>
><br>
><br>
> On Thu, 1 Sep 2016, Patrick Muldoon wrote:<br>
><br>
>>> On Sep 1, 2016, at 3:07 PM, <a href="mailto:freebsd@fongaboo.com" target="_blank">freebsd@fongaboo.com</a> wrote:<br>
>>><br>
>>><br>
>>> What is the difference between editing /etc/crontab and running crontab -e?<br>
>><br>
>><br>
>> /etc/crontab is system crontab<br>
>><br>
>> crontab -e edits the user specific crontab, which is generally stored in /var/cron/tabs/${user}<br>
>><br>
> I guess I knew that... But what are the differences/pros/cons to editing /etc/crontab vs. running crontab -e... AS ROOT??<br>
><br>
><br>
<br>
You may wish to use sudoedit instead of editing a file as root.<br>
<br>
<br>
<br>
_______________________________________________<br>
CDBUG-talk mailing list<br>
<a href="mailto:CDBUG-talk@lists.nycbug.org" target="_blank">CDBUG-talk@lists.nycbug.org</a><br>
<a href="http://lists.nycbug.org/mailman/listinfo/cdbug-talk" rel="noreferrer" target="_blank">http://lists.nycbug.org/mailman/listinfo/cdbug-talk</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">-- James L. Lauser<br>
<a href="mailto:james@jlauser.net">james@jlauser.net</a><br>
<a href="http://jlauser.net">http://jlauser.net</a></p>
</div></div>