How to use sudo in cron jobs. when running as a non-root user, crontab -e will open the user's crontab, while. sudo crontab -e will open the root user's crontab. It's not recommended to run sudo commands in a user cron job, so if you need root privileges in your cron job, you should run that job in root's crontab and remove sudo from the command. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.