PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.comp.lang.php > Re: cron job
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: cron job

Réponse
 
LinkBack Outils de la discussion
Vieux 19/07/2007, 07h58   #1
Marnok.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cron job


"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!


  Réponse avec citation
Vieux 20/07/2007, 01h03   #2
gagal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cron job

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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h59.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07064 seconds with 10 queries