tara giska
tara giska

Reputation: 101

hostgator cron job not working

I am having a problem in making my cron job to work,

here is the only code in my php file:

sendreport.php

mail("[email protected]", "test email", "test message");

and here is the cron job in the cpanel:

0 10 * * 1,2,3,4,5,6 php /home/username/public_html/foldername/sendreport.php

I am using hostgator.

The cron job should run every 10 am from Monday, Tuesday, Wednesday, Thursday, Friday and Saturday but seems like it is not working.

I was wondering if I am doing it correct?

Upvotes: 2

Views: 10231

Answers (2)

Justin
Justin

Reputation: 49

This has nothing to do with your code. Hostgator blocks cronjobs running more frequent then every 15minutes. (YES I KNOW THIS IS ALMOST A YEAR OLD - ITS FOR FUTURE PEOPLE)

Cron Job Limits

Shared and Reseller

You may NOT run a cron job more often than every 15 minutes.

Ref: https://www.hostgator.com/help/article/what-are-cron-jobs

Upvotes: 3

nomadic_squirrel
nomadic_squirrel

Reputation: 644

To add to what Justin said. Per this article shared and reseller can only fire at most every 15 minutes.

Upvotes: 0

Related Questions