Cron Job is not working

Hi Guys,
Please find below the cron job command, I’ve added a single scheduled cron job when I run the cron it’s showing " NO OUTPUT GENERATED"

Command - /usr/bin/php -f /home/peoed/public_html/index.php/Autoscript_send_email >/dev/null 2>&1

Please help me someone to fix the issue, manually its working.

No output generated is not an error.

Is the script sending the email on schedule? If it is, you have no problem. Please check.

>> /dev/null discards stdout; and 2>&1 redirects error output to stdout, which in turn discards it. So the only way to know whether the cron job is working is whether the mail is being sent.

I’d create a new job with the same command to run every 10 minutes (*/10 * * * *) to test it. If the mail is sent, it’s working.

Richard

1 Like

Why would you expect output when you’ve redirected everything to /dev/null?

1 Like

Thank you Calport

Guys, Thank you very much. Actually, I found the error I’m putting “/” in the command line please check in the bold font.:

Command - /usr/bin/php -f /home/peoed/public_html/index.php**/**Autoscript_send_email >/dev/null 2>&1

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.