CronTab qui ne veut pas passer : n'accepte pas une heure précise.

CronTab qui ne veut pas passer : n'accepte pas une heure précise. - Linux et OS Alternatifs

Marsh Posté le 02-01-2004 à 22:53:25    

Pourquoi cette crontab ne veut pas s'executer ??  
 
44 22 * * 5,6 touch /root/netadmin/abc
ou
44 22 * * 5,6 root touch /root/netadmin/abc
 
Celle ci fonctionne :
* * * * * root touch /root/netadmin/abc
 
Merci :)


Message édité par Master_Jul le 02-01-2004 à 23:32:32
Reply

Marsh Posté le 02-01-2004 à 22:53:25   

Reply

Marsh Posté le 02-01-2004 à 22:59:43    

Master_Jul a écrit :

Pourquoi cette crontab ne veut pas s'executer ??  
 
44 22 * * 5,6 touch /root/netadmin/abc
 
 
Celle ci non plus :
 
* * * * * touch /root/netadmin/abc
 
 
Merci :)


 
 
5,6 c'est censé représenté quoi ??? normalement le dernier paramètre est le jour de la semaine


---------------
Bachelor N°2 : le Topic : http://forum.hardware.fr/hardwaref [...] -22497.htm
Reply

Marsh Posté le 02-01-2004 à 23:01:23    

vendredi et samedi
 
j'essai avec 4 à tout hasard mais j'ai lu que vendredi c'est 5, lundi 1, dimanche 0 ou 7


Message édité par Master_Jul le 02-01-2004 à 23:01:50
Reply

Marsh Posté le 02-01-2004 à 23:02:17    

ok super, vendredi c'est 4, je crois que ça change selon les distribs

Reply

Marsh Posté le 02-01-2004 à 23:05:01    

Master_Jul a écrit :

vendredi et samedi
 
j'essai avec 4 à tout hasard mais j'ai lu que vendredi c'est 5, lundi 1, dimanche 0 ou 7


 
Ah ok j'avais pas percuté, mmhhh c'est tout con mais abc est-il bien executable  :??:  ??


Message édité par xp2100+ le 02-01-2004 à 23:06:25

---------------
Bachelor N°2 : le Topic : http://forum.hardware.fr/hardwaref [...] -22497.htm
Reply

Marsh Posté le 02-01-2004 à 23:06:44    

y'a la commande "touch" c'est juste pour créer un fichier ici

Reply

Marsh Posté le 02-01-2004 à 23:09:39    

XP2100+ a écrit :


 
Ah ok j'avais pas percuté, mmhhh c'est tout con mais abc est-il bien executable  :??:  ??


la il demande juste a la cron de créer un fichier abc dans /root/netadmin/.
par contre c'est bien la crontab de root qui est édité ?


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:10:12    

j'édite le fichier /etc/crontab

Reply

Marsh Posté le 02-01-2004 à 23:10:57    

après quelques tests, il n'aime pas quand je lui demande une heure précise avec heure et minute

Reply

Marsh Posté le 02-01-2004 à 23:11:21    

Master_Jul a écrit :

y'a la commande "touch" c'est juste pour créer un fichier ici


 
mais en fait elle est censé faire quoi ta commande a part créer un fichier vide ??


Message édité par xp2100+ le 02-01-2004 à 23:12:12
Reply

Marsh Posté le 02-01-2004 à 23:11:21   

Reply

Marsh Posté le 02-01-2004 à 23:12:11    

ben rien, c'est juste pour tester et voir si la crontab passe bien, je vérifie si le fichier a été créé
 
sinon j'y met un script pour couper internet

Reply

Marsh Posté le 02-01-2004 à 23:14:04    

Master_Jul a écrit :

j'édite le fichier /etc/crontab


oki.
utilises plutôt ceci en root
crontab -e
& cela sera plus simple ;)

Citation :

après quelques tests, il n'aime pas quand je lui demande une heure précise avec heure et minute


hum ?
tu as un message d'erreur précis ?


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:16:27    

non je vois rien qui se passe, le fichier n'est pas créé c'est tout

Reply

Marsh Posté le 02-01-2004 à 23:18:03    

t'es allé voir dans le syslog si la commande s'est bin executé ??


---------------
Bachelor N°2 : le Topic : http://forum.hardware.fr/hardwaref [...] -22497.htm
Reply

Marsh Posté le 02-01-2004 à 23:20:01    

Master_Jul a écrit :

non je vois rien qui se passe, le fichier n'est pas créé c'est tout


tu peux nous donner ta ligne de crontab ?


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:22:05    

[root@serveur netadmin]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.9897 installed on Fri Jan  2 23:19:49 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
18 23 * * 4,5 touch /root/netadmin/gayzou ->marche pas
* * * * 4,5 touch /root/netadmin/grosgayzou -> marche bien
[root@serveur netadmin]# date
Fri Jan  2 23:21:52 CET 2004


Message édité par Master_Jul le 02-01-2004 à 23:23:30
Reply

Marsh Posté le 02-01-2004 à 23:26:57    

Master_Jul a écrit :

[root@serveur netadmin]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.9897 installed on Fri Jan  2 23:19:49 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
18 23 * * 4,5 touch /root/netadmin/gayzou ->marche pas
* * * * 4,5 touch /root/netadmin/grosgayzou -> marche bien
[root@serveur netadmin]# date
Fri Jan  2 23:21:52 CET 2004


zarbe ca marche bien chez moi :/

3:24 mikala@andrea ~/test% crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.10627 installed on Fri Jan  2 23:24:39 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
25 23 * * 4,5 touch /home/mikala/test/gazou
23:24 mikala@andrea ~/test% ls
23:25 mikala@andrea ~/test% ls
gazou


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:28:24    

est ce que ça serait possible que le crontab prenne une heure différente du "date" comme je suis en "CET" je sais pas si ça pourrait avoir un rapport

Reply

Marsh Posté le 02-01-2004 à 23:29:34    

non, je ne pense pas .
 


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:33:07    

euh  
/etc/init.d/crontab restart ?

Reply

Marsh Posté le 02-01-2004 à 23:37:36    

GUG a écrit :

euh  
/etc/init.d/crontab restart ?
 


 
 
Il n'est que là :
 

[root@serveur netadmin]# which crontab
/usr/bin/crontab


 
crontab restart -> commande invalide
 
J'ai redémarré le serveur et planifié un nouveau "touch" à 23 h 40.

Reply

Marsh Posté le 02-01-2004 à 23:41:35    

/etc/init.d/cron restart
 
c'est plutot ca non (enfin sous debian)


Message édité par xp2100+ le 02-01-2004 à 23:41:56

---------------
Bachelor N°2 : le Topic : http://forum.hardware.fr/hardwaref [...] -22497.htm
Reply

Marsh Posté le 02-01-2004 à 23:43:24    

Ca marche après le reboot, merci et désolé pour ma question bête. :o
 
Bizarre quand même que les * * x x x soient pris directement en compte sans redémarage du service.

Reply

Marsh Posté le 02-01-2004 à 23:50:02    

ils sont pris en compte sans rédemarrage du service .
tu as quoi comme distribution ?
(mon test était sur mon desktop a savoir ma mandrake :D )


---------------
Intermittent du GNU
Reply

Marsh Posté le 02-01-2004 à 23:51:16    

SmoothWall : www.SmoothWall.org

Reply

Marsh Posté le 03-01-2004 à 00:26:54    

XP2100+ a écrit :

/etc/init.d/cron restart
 
c'est plutot ca non (enfin sous debian)


 
oui bon c'est pareille [:ddr555]

Reply

Marsh Posté le    

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed