irockwebhosting
02-02-2010, 10:45 PM
I don't know why does cron isn't working on our installation. Basically we placed our WHMCS on a cPanel based server and somehow created a cron job via the Cron Job center of cPanel and set it running once a day every 10am. However it is not fairly working.
We have also double checked the syntax for the cron, as well as used various ways of specifying cron command but still it's not working.
cPanel doesn't even dump an e-mail if cron was successful or not, however we are able to run cron with other sites on the same server.
We would appreciate if you could help us out on this issue. :D
somehow created a cron job via the Cron Job center of cPanel and set it running once a day every 10am.
Somehow?
Please include the cron info you used here, and explain what you mean by "not fairly working". What is it not doing that you expect it to?
irockwebhosting
02-02-2010, 10:58 PM
Somehow?
Please include the cron info you used here, and explain what you mean by "not fairly working". What is it not doing that you expect it to?
Basically this is the setting we have on the cPanel right now:
0 10 * * * php -q /home/v3myiro/public_html/admin/cron.php
and we are expecting for the cron to detect uninvoiced products and generate invoice, terminate or suspend unpaid packages, and close unclosed tickets (in our case should be 48 hours).
Have you set an email address for the cron to send the results to? In the cron settings in cpanel, there is a box at the top of the cron list for an email address. Fill that in.
The cron may be looking in a folder that doesn't exist, if this is the site in your signature. Is WHMCS in a folder? That's missing from the cron path.
Make sure the file it's calling exists, and that it has enough permissions for the daemon to read it (644 is enough on most servers). Have you checked the cron logs in both WHMCS (Utilities/activity log) and cpanel?
For Cpanel, you'd need shell:
cat /var/log/cron |less |grep stuff_regarding_whmcs_script
You really should also change the admin folder name and perform the additional security steps outlined at the WHMCS Wiki. ;)
irockwebhosting
02-02-2010, 11:34 PM
I just did nothing and cron job is working now.
Also tried running:
cat /var/log/cron |less |grep stuff_regarding_whmcs_script
No output. By the way what does this command do?
No output.
You did change the last part to something relevant to your own cron job, right? That was just an example of the syntax, not the actual command. ;)
irockwebhosting
02-02-2010, 11:50 PM
You did change the last part to something relevant to your own cron job, right? That was just an example of the syntax, not the actual command. ;)
Lolz. I overlooked that part. :D Anyways, I did nothing an just right now i got whmcs cron job activity logs.
By the way what does this command do?
cat /var/log/cron |less |grep stuff_regarding_whmcs_script
Cat will read the file and output to the screen
"/var/log/cron" is what it's reading
"|less" means pipe to the "less" program which shows one screen of output at a time
"|grep stuff" pipes that result to grep, which will search for the string you add after the space.
A pipe "|" simply passes things to another program to do something.
irockwebhosting
02-05-2010, 08:09 AM
Well thanks bear for a very wise suggestion about admin directory change, also I am now running cron via web browser and did it every morning at least once a day. LOlz.