Is it possible to make a Bash file run as root in crontab?


I need that Bash file to run periodically, and it must be as root.

Is that possible?

[root@file nutch-0.9]# locate crontab
[root@file nutch-0.9]# 
1/10/2014 5:48:43 PM

Yes, just add it to the root users' crontab; run the crontab -e command.

The places cron stores its files can be a little bizzare, so use the crontab -e command which will make sure it's in the right place, and I believe it checks the syntax.

1/10/2014 5:55:37 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow