Am using Ubuntu14.04. Server Backup will take place every week. But will this affect the crontab? Because "sudo crontab -e" does not contain the cron job which I gave. Please help! Thanks in advance
Every user has their individual crontab. This includes the root user.
When you add a cronjob with crontab -e
, you add it into the list of jobs for the current user.
This means that with sudo crontab -e
, you will be editing the list of cron jobs for the root user.
To edit the crontab for a specific user, use sudo crontab -e -u username
, or log in as that user and use crontab -e
.
crontab -e
shows your personal crontab. the personal crontab, even for the root user, is unrelated to the system crontab in/etc/crontab
,/etc/cron.d
,/etc/cron.weekly
and friends. – Ulrich Schwarz May 31 '17 at 7:30sudo crontab -u <user> -e
instead or were you trying to set-up a system crontab? – Tigger May 31 '17 at 8:18