Ah...THANK YOU! This explains things. Ahhh, I was pulling my hair out trying to figure this out. And yes, I think the cron manager could definitely be improved by offering CURL/WGET functionality as well as the ability to specific the cron run times. Currently you have no way to specific the time of day to run the job. Also I have several websites on this server, so I like to space out the Drupal Cron jobs as they are somewhat CPU intensive for some of my websites, so I don't want them all running at the same time.
But I was trying to stick with using the control panel to do all tasks for this web server, but it seems it's not suitable for my needs.
Thank you for explaining and pointing me in the right direction.
For anyone that comes across this thread, I thought I would post how I ended up solving this in the end. Here is what I did.
1.) First remove all the Cron tasks I added to Cron manager from Sentora's control panel, no need to have them in there, as they won't work.
2.) While logged in as root into my web server I ran:
# crontab -e
3.) now the crontab file for root is open I added the following line to the end of the file:
0 2 * * * wget -O - -q -t 1 http://www.mysite.com/cron.php
4.) Save the file and now you're done.
Change the first 5 characters to suit your needs. This is setup to run every day of the year at 2am.
You can probably use Curl for even simplier code.
0 2 * * * curl -s http://www.mysite.com/cron.php
If you want to make sure it's working you can change the setting to * * * * * so that it runs every minute.
Then run
# tail -f /var/log/syslog | grep CRON
this will show you realtime results of what's being added to the log file. You should see your cron job running and your Drupal site should show that cron was refreshed within the last minute everytime you refresh the status page within Drupal.
Hope this helps someone!
But I was trying to stick with using the control panel to do all tasks for this web server, but it seems it's not suitable for my needs.
Thank you for explaining and pointing me in the right direction.
For anyone that comes across this thread, I thought I would post how I ended up solving this in the end. Here is what I did.
1.) First remove all the Cron tasks I added to Cron manager from Sentora's control panel, no need to have them in there, as they won't work.
2.) While logged in as root into my web server I ran:
# crontab -e
3.) now the crontab file for root is open I added the following line to the end of the file:
0 2 * * * wget -O - -q -t 1 http://www.mysite.com/cron.php
4.) Save the file and now you're done.
Change the first 5 characters to suit your needs. This is setup to run every day of the year at 2am.
You can probably use Curl for even simplier code.
0 2 * * * curl -s http://www.mysite.com/cron.php
If you want to make sure it's working you can change the setting to * * * * * so that it runs every minute.
Then run
# tail -f /var/log/syslog | grep CRON
this will show you realtime results of what's being added to the log file. You should see your cron job running and your Drupal site should show that cron was refreshed within the last minute everytime you refresh the status page within Drupal.
Hope this helps someone!