Bonjour,
Je découvre les fonctions de taches planifiées avec un fichier php à la racine de mon répertoire web.
1/ J'ai essayé avec le service web d'ovh (planificateur de tâche) : ne fonctionne pas.
2/ J'essaye avec un service web http (webcron.org) : il m'indique que le fichier ne peut être trouvé ! et pourtant il se trouve bien sur le répertoire web; à sa racine.
J'ai certainement loupé quelque chose, mais où ?
Voici le log retour suite au test fait sur webcron.org
Voici le fichier .php cron en question appelé :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 cronjob: http://www.monsite.fr/vemodtrigger.php?cron=1 Executé à : lundi 17 août 2009 21:43:54 Time-out: 0,6 sec (max. 30 sec) Credits: 0,0001 Statut: 404 - Not Found Le fichier ne peut pas etre trouvé Entête HTTP/1.1 404 Composant non trouvé Date: Mon, 17 Aug 2009 19:43:50 GMT Server: Apache/2.2.X (OVH) X-Powered-By: PHP/5.2.10 P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Expires: Mon, 1 Jan 2001 00:00:00 GMT Cache-Cont Extrait sur 255 caracteres Contenu <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" d Extrait sur 255 caracteres
Merci bcp pour vos pistes
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <?php if (@$_REQUEST['cron'] || @$_REQUEST['throttle']) { if (!file_exists('index.php')) die('index.php not found. This file must be installed in the root directory'); ob_start(); @include('index.php'); ob_end_clean(); if (!file_exists('components/com_vemod_news_mailer/vemod_news_mailer.php')) die('components/com_vemod_news_mailer/vemod_news_mailer.php not found. Is Vemod News Mailer installed?'); include('components/com_vemod_news_mailer/vemod_news_mailer.php'); } ?>
Partager