Welcome to The-Server-admin.com the place were administrators can get the needed skills for the server room.




Linux Cron

Linux Cron

Cron jobs are task setup on a Linux or UNIX system to run at a set time. I seen a few questions around about cronjobs. Here is a reference on cron.

How do I visit a site every day at 5 AM?Run the command “crontab -e” to edit the cron file. Then type:

0 5 * * * curl http://www.the-server-admin.com

Curl is a basic Linux command. Cron will run any command in this order.

How do I get cron Emails? Edit he crontab file: crontab -e Then make cron look like:

MAILTO: This e-mail address is being protected from spambots. You need JavaScript enabled to view it.

0 5 * * * curl http://www.the-server-admin.com

You can also get disk space output via cron. Edit the crontab... you should know who to do this by now. :) Make cron look like this:

MAILTO: This e-mail address is being protected from spambots. You need JavaScript enabled to view it.

0 5 * * * curl http://www.the-server-admin.com

0 12 * * * df -h

So any command you want to run everyday add the command to crontab.

If there are any questions, see our forum at http://forum.the-server-admin.com

Powered by Bullraider.com