Koozali.org: home of the SME Server
Obsolete Releases => SME 8.x Contribs => Topic started by: animare on September 28, 2012, 01:36:19 PM
-
Hi,
I run man drupal sites using the sme server and I would like to run a cron.php file.
I am using webmin to create a scheduled cron job.
I can successfully run the cron job using wget and a url pointing to the cron file.
But I really want to run the cron file locally. i.e.
/home/e-smith/files/ibays/drupalsite/html/cron.php
I have tried many ways but none seem to work. e.g :
/usr/bin/php /home/e-smith/files/ibays/drupalsite/html/cron.php
php /home/e-smith/files/ibays/drupalsite/html/cron.php
etc.
Any help would be great!
Thanks
Apologies if posting this in the wrong place.
-
My crontab (login as root; crontab -e) uses a cd command before running a local php, like this:
* * * * * cd /home/e-smith/files/ibays/sugarcrm/html; php -f cron.php > /dev/null 2>&1
However, I don't think I ever got local php execution working for Drupal, so my crontab line for that looks like this:
45 * * * * /usr/bin/wget -O - -q -t 1 --no-check-certificate https://mind.yourown.biz/cron.php?cron_key=jpGWAhDarVIgareyoukiddingpGgK54wMwSBsKRpZsY > /dev/null 2>&1
-
Thanks,
That first command didn't work for drupal, I'm going to keep trying till I find a way!
I'll post back if I figure it out
-
I think I'm trying to do something that cannot be done in sme server.
Drupal docs says that using wget is the recommended way anyway so I'm probably just wasting time.
Thanks again
-
I figured out how to do it:
/usr/bin/drush -r /home/e-smith/files/ibays/d7anim/html cron > /dev/null 2>&1
You must have drush installed on your server. But it is very easy to install.
I think it is much better to run cron locally, especially if you have your ibay locked down with password (Or you use a .htacesss file)