Main Tutorials

Linux – How to run cron job as root?

On Linux, uses sudo crontab -e to define cron jobs that need to run as a root user.


$ sudo crontab -e

# Run every hour
0 * * * * * /path/this-script-need-root.sh

References

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments