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

No comments yet. Be the first to leave a comment!

Leave a Comment

Your email address will not be published. Required fields are marked *