cron - run cronjobs and send to email problems -


I want to create cronjobs which can be done every 10 minutes & lt; Now time

and send me the follow-up TST email with the email.

"Deleted command"

My code looks like this

mail = "my_email@mail.com" * / 10 * * * I have checked my mail in the last 30 minutes .. and still have received any mail. Am I doing it wrong?

First of all, as I remember php scripts should be executed in this manner (for example For Ubuntu Path, not sure about other distros):

  / usr / bin / php-cgi /var/www/php-sites/dlf/cron_jobs.php  

In addition, you can save the job output in the file to see the exact reasons for the failures, for your job it may appear:

  * / 10 * * * * / Usr / bin / php-cgi /var/www/php-sites/dlf/cron_jobs.php & gt; /tmp/cron.out2> & Amp; 1  

Check cron.out content.

Hope this will be helpful.

Edit

I did a little test and in general the way of Shell also works. I have created the phptest.sh (+ x) script with the content:

  #! Echo / usr / bin / php-cgi "This works like this!";  

And it seems to work except one thing, it throws the header in stdout, like this:

  *** *** ** * ~ ~ $ /phptest.sh By X-Power: PHP / 5.2.10-2UuntUU 6. 3 content-type: text / html echo "this works like this!";  

But I think if we have a problem, then we can get rid of them in some way.

Its only advantage is the low path :)


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -