Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am checking if the server is doing cronjob as it's expected.

I have the following code. But I am not sure if it is doing the repeated job or not. I suspect not.

The cron.php is working fine. If I visit with a browser, it shows the results.

Could anyone tell me how I can know if it is doing the job?

I thought sending email notice to me is one idea.

How can I send email to me with the results?

Or is there better ways to check it?

*/10 * * * * /usr/bin/wget
share|improve this question

From the cron man page:

When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists).

Just add the following line to the beginning of your crontab:

share|improve this answer

You can check in your system log if the cron job is running or not, see files in /var/log, depending of your distribution the file may change but generally /var/log/cron is the right place to check.

If you want more information on how the job has been done, the best would be to send an email inside your php script so that you can correctly set the email body with failed or ok result as well as useful information.
You could also send email directly from cron, but as you use wget you will not be able to know if the script as run correctly or not (you can just know that it has run or not, not if something has been wrong in it)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.