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

  • 1
    "The cron job that you gave"? How did you give tho cronjob? – Kusalananda May 31 '17 at 7:18
  • 2
    Crystal ball guess: 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:30
  • Try sudo crontab -u <user> -e instead or were you trying to set-up a system crontab? – Tigger May 31 '17 at 8:18
  • @Kusalananda : I used this command "crontab -e" – Octopus May 31 '17 at 8:23
  • @Tigger This works – Octopus May 31 '17 at 8:25

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.