|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
"gagal" <lynettesmith@gmail.com> wrote in message news:1184718859.232297.98790@j4g2000prf.googlegrou ps.com... >I wrote a script to send out a birthday email each month. When I > tried to run as a cron job I got "no file found". I'm using cpanel > and have file in folder ie crons/birthdayemail.php. I figured I gave > it wrong url in my cron but I'm not sure what to do. > Is it the file in the previous post? Could be some problem with the include - I had trouble getting includes to work in a cron job until I put chdir(dirname(__FILE__)); at the top of the file I was calling in the cron. Also the command to run was usr/bin/php -q /home/MYHOST/public_html/MYDOMAIN/FOLDER/FILE.php which was a bit more complex that I'd realised I would need! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Jul 19, 2:58 am, "Marnok.com" <wizardha...@pottermarnok.com> wrote:
> "gagal" <lynettesm...@gmail.com> wrote in message > > news:1184718859.232297.98790@j4g2000prf.googlegrou ps.com... > > >I wrote a script to send out a birthday email each month. When I > > tried to run as a cron job I got "no file found". I'm using cpanel > > and have file in folder ie crons/birthdayemail.php. I figured I gave > > it wrong url in my cron but I'm not sure what to do. > > Is it the file in the previous post? > > Could be some problem with the include - I had trouble getting includes to > work in a cron job until I put > > chdir(dirname(__FILE__)); > > at the top of the file I was calling in the cron. > > Also the command to run was > usr/bin/php -q /home/MYHOST/public_html/MYDOMAIN/FOLDER/FILE.php > > which was a bit more complex that I'd realised I would need! Thanks, It was a command line problem. I had to use wget -O /dev/null url |
|
![]() |
| Outils de la discussion | |
|
|