I'm running a PHP script in a cronjob and I want to send emails every 5 minutes
My current (crontab) cronjob:
10 * * * * /usr/bin/php /mydomain.in/cromail.php > /dev/null 2>&1
The cronmail.php is as follows:
<?php $from = 'D'; // sender $subject = 'S'; $message = 'M'; $message = wordwrap($message, 70); mail("email@example.com", $subject, $message, "From: $fromn"); ?>
But I've not received an email in 30 minutes with this configuration.
crontabfile, the fields are:
blahat 10 minutes past every hour.
If you want every five minutes, use either:
meaning every minute but only every fifth one, or:
cronexecutables that don't understand the
If it still seems to be not working after that, change the command to something like:
and monitor that file to ensure something's being written every five minutes. If so, there's something wrong with your PHP scripts. If not, there's something wrong with your