Maybe a silly question, but I’m trying to get a cronjob to work. Although this could be a question for serverfault I think its also a SO-question.
Anyway:
I have set up a cronjob to be executed everey 1 minute of every hour, day (number), day (name) and month. The given command is: /home/easybr01/domains/easybranding.nl/public_html/cronjobs/test.php
Which is nothing more than a file with a simpe php function mail(to, subj, content, hdrs) to test if it works… but the mails never come in.. and they’re not in a spam folder eighter..
Does someone know what’s wrong?? I figured this should be pretty straight forward…
You should indicate ${PATH_TO_PHP} into the cronjob, like :-
Alternatively, you can make the script executable (ex. mod 744),
and place
#!${PATH_TO_PHP}into first line of your PHP script, like :-