Crontab

From James's Wiki
Revision as of 22:26, 1 January 2022 by Ractive (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

to edit the crontab of a user

sudo crontab -u username -e

root crontab:

sudo crontab -e

send ALL (even errors) to null:

* * * * *       root    /usr/local/sbin/mycommand.sh > /dev/null 2>&1

send only normal output to null (will still email errors):

* * * * *       root    /usr/local/sbin/mycommand.sh > /dev/null
Crontab examples.webp