I have set up a simple php page on my site to do some everyday mysql database tasks for updating the site.
Php Cron Job Problem
10
I have set up a simple php page on my site to do
some everyday mysql database tasks for updating
the site.
I have run the script from a browser window and it works
however I tried doing a cron and I am not getting an email
to tell me the cron has been done and looking at the site it
looks like it hasn't been used.
I have tried both of these in my cron set up:
php -q /home/XXXXXX/public_html/cron_XXXXXX.php > /dev/null
/usr/bin/GET http://www.XXXXXXXX.com/cron_XXXXXX.php
I set the cron job to run at:
0 minutes
every other hour
every day
every month
every weekday
Niether appear to be working.
This is a short excert from the script:
<?php
include 'system/config.php';
include 'system/opendb.php';
mysql_query("UPDATE `XXXXXX`.`XXXXX` SET `intCategory` = '131' WHERE `intAuthorId` =39930
AND `intStatus` =0")
or die(mysql_error());
mysql_query("DELETE FROM `XXXXXX`
WHERE `textArticleText` LIKE CONVERT( _utf8 '%www.%'
USING latin1 )
COLLATE latin1_swedish_ci
or die(mysql_error());
include 'system/closedb.php';
?>
As I say the script works OK from a browser window so has anyone any idea
what I may be doing wrong.
Any help much appreciated.
Thanks
Terry
some everyday mysql database tasks for updating
the site.
I have run the script from a browser window and it works
however I tried doing a cron and I am not getting an email
to tell me the cron has been done and looking at the site it
looks like it hasn't been used.
I have tried both of these in my cron set up:
php -q /home/XXXXXX/public_html/cron_XXXXXX.php > /dev/null
/usr/bin/GET http://www.XXXXXXXX.com/cron_XXXXXX.php
I set the cron job to run at:
0 minutes
every other hour
every day
every month
every weekday
Niether appear to be working.
This is a short excert from the script:
<?php
include 'system/config.php';
include 'system/opendb.php';
mysql_query("UPDATE `XXXXXX`.`XXXXX` SET `intCategory` = '131' WHERE `intAuthorId` =39930
AND `intStatus` =0")
or die(mysql_error());
mysql_query("DELETE FROM `XXXXXX`
WHERE `textArticleText` LIKE CONVERT( _utf8 '%www.%'
USING latin1 )
COLLATE latin1_swedish_ci
or die(mysql_error());
include 'system/closedb.php';
?>
As I say the script works OK from a browser window so has anyone any idea
what I may be doing wrong.
Any help much appreciated.
Thanks
Terry
- theIMgeek
- [ 1 ] Thanks
- [1] reply
- terry1288
- [1] reply
- nevadasoft
- circus_freak
- Eric Oblon
- norbertwarne Banned
- mogol87
- jminkler
Next Topics on Trending Feed
-
10