Setup cron job in linux

You can setup cron job for root user using shell 

List corn of root user
# crontab -l -u root
or,

$ sudo crontab -l -u root

Setup cron job from shell/terminal
# crontab -l | { cat; echo "@monthly /usr/bin/php5 /location-to-execute"; } | crontab -

Run/setup Cron job for root from local user
#su - root -c "crontab -l"
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

1 comments: