Crontab ne marche pas
Fermé
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
-
19 nov. 2009 à 10:08
dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 - 20 nov. 2009 à 11:03
dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 - 20 nov. 2009 à 11:03
A voir également:
- No crontab for root
- Kingo root - Télécharger - Divers Utilitaires
- Dns probe finished no internet ✓ - Forum DNS
- No signal tv - Guide
- Hdmi no signal - Forum Ecran
- Download instagram for pc - Télécharger - Divers Communication
24 réponses
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 11:10
19 nov. 2009 à 11:10
Voici ce qu'il me donne :
root 1140 1 0 11:21 ? 00:00:00 cron
root 2122 2102 0 13:07 pts/0 00:00:00 grep cron
root 1140 1 0 11:21 ? 00:00:00 cron
root 2122 2102 0 13:07 pts/0 00:00:00 grep cron
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 15:40
19 nov. 2009 à 15:40
Ouais voila ce que j'ai fait et tjs rien fanchement je sais pas quoi faire :
root@pc-med300709b:~# service cron stop
cron stop/waiting
root@pc-med300709b:~# service cron start
cron start/running, process 2289
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
50 15 * * * /sbin/shutdown -h 0 >> /tmp/log.txt
?
root@pc-med300709b:~# service cron stop
cron stop/waiting
root@pc-med300709b:~# service cron start
cron start/running, process 2289
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
50 15 * * * /sbin/shutdown -h 0 >> /tmp/log.txt
?
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 895
19 nov. 2009 à 10:30
19 nov. 2009 à 10:30
Salut,
Ton script est exécutable au moins ?
Il y a quoi dedans ?
Ton script est exécutable au moins ?
Il y a quoi dedans ?
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 10:40
19 nov. 2009 à 10:40
Oui le script est exécutable si je le lance a la main sa fonctionne.
Je te donne son contenu :
#!/bin/sh
sudo shutdown -h 0
Merci de ton aide
Cdt
Tony
Je te donne son contenu :
#!/bin/sh
sudo shutdown -h 0
Merci de ton aide
Cdt
Tony
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 895
19 nov. 2009 à 10:42
19 nov. 2009 à 10:42
Euh... dans la mesure où la crontab est exécutée par le pseudo "root", enlever le "sudo" et rajouter le chemin complet vers "shutdown" (/sbin/shutdown).
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 10:54
19 nov. 2009 à 10:54
Ok j'ai docn essayer de faire ceci et encore pareil je commence a déséspéré :(
Voici ce que j'ai essayer de faire :
administrateur@pc-med300709b:~$ sudo -s
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
00 11 * * * root /sbin/shutdown -h 0
?
00 11 * * * root /sbin/shutdown -h 0
?
00 11 * * * /sbin/shutdown -h 0
?
00 11 * * * root /sbin/shutdown -h 0 >> /tmp/log.txt
?
Sa ne marche encore pas
Voici ce que j'ai essayer de faire :
administrateur@pc-med300709b:~$ sudo -s
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
00 11 * * * root /sbin/shutdown -h 0
?
00 11 * * * root /sbin/shutdown -h 0
?
00 11 * * * /sbin/shutdown -h 0
?
00 11 * * * root /sbin/shutdown -h 0 >> /tmp/log.txt
?
Sa ne marche encore pas
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 10:55
19 nov. 2009 à 10:55
hello
cron tourne ?
ps -ef¦grep cron
cron tourne ?
ps -ef¦grep cron
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 12:03
19 nov. 2009 à 12:03
teste le cron avec une ligne
* * * * * date >> /tmp/testcron.log
* * * * * date >> /tmp/testcron.log
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 13:10
19 nov. 2009 à 13:10
tjs pareil cela ne fonctionne pas !!!
Je commence a déséspéré vosu connaissez un autre moyen sinon pour programmer un arret quotidien
à 23h59 ???
Merci de votre aide
Je commence a déséspéré vosu connaissez un autre moyen sinon pour programmer un arret quotidien
à 23h59 ???
Merci de votre aide
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 14:11
19 nov. 2009 à 14:11
affiche
crontab -l
cron ne fonctionne pas, essaye de le redémarrer
/etc/init.d/cron stop
/etc/init.d/cron start
/etc/init.d/cron status
crontab -l
cron ne fonctionne pas, essaye de le redémarrer
/etc/init.d/cron stop
/etc/init.d/cron start
/etc/init.d/cron status
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 14:32
19 nov. 2009 à 14:32
J'ai donc essayé les 3 commandes est j'ai comme résultat :
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service cron status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status cron
cron start/running, process 2245
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service cron status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status cron
cron start/running, process 2245
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 14:41
19 nov. 2009 à 14:41
essaye
service cron stop
service cron start
service cron stop
service cron start
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 15:45
19 nov. 2009 à 15:45
que répond crontab -l
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 16:26
19 nov. 2009 à 16:26
Il me repond aucun crontab de crée !!
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 16:34
19 nov. 2009 à 16:34
quand tu edites avec crontab -e tu ne sauve pas en sortant, quel editeur utilises tu ?
ou bien essaye:
echo '* * * * * date >> /tmp/log1' ¦ crontab -
crontab -l
tail -f /tmp/log1
ou bien essaye:
echo '* * * * * date >> /tmp/log1' ¦ crontab -
crontab -l
tail -f /tmp/log1
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
19 nov. 2009 à 17:25
19 nov. 2009 à 17:25
Question peut etre bete mais pour moi quand je fini d'écrire ma ligne j'appuie sur entrée et après sa me met jsute :
?
Cela devrai dire que quand jappuie sur entrée il l'enregistre pas
Quelle command utiliser pour qu'il enregistre alors ma commande ????
?
Cela devrai dire que quand jappuie sur entrée il l'enregistre pas
Quelle command utiliser pour qu'il enregistre alors ma commande ????
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
19 nov. 2009 à 18:13
19 nov. 2009 à 18:13
si c'est ed taper
w
q
w
q
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
20 nov. 2009 à 10:08
20 nov. 2009 à 10:08
Salut désolé j'ai pas pu le fare hier voial ce que sa me donne :
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
15 10 * * * /sbin/shutdown -h 0
?
w
29
q
crontab: "/usr/bin/sensible-editor" exited with status 1
root@pc-med300709b:~# crontab -l
no crontab for root
J'arrve pas a comprendre
root@pc-med300709b:~# crontab -e
no crontab for root - using an empty one
29
1
# m h dom mon dow command
15 10 * * * /sbin/shutdown -h 0
?
w
29
q
crontab: "/usr/bin/sensible-editor" exited with status 1
root@pc-med300709b:~# crontab -l
no crontab for root
J'arrve pas a comprendre
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
20 nov. 2009 à 10:13
20 nov. 2009 à 10:13
quel éditeur texte utilises-tu habituellement ? tu fais par ex. pour que crontab ouvre vi :
export EDITOR=/usr/bin/vi
crontab -e
export EDITOR=/usr/bin/vi
crontab -e
Tony85
Messages postés
72
Date d'inscription
lundi 13 octobre 2008
Statut
Membre
Dernière intervention
2 août 2011
7
20 nov. 2009 à 10:24
20 nov. 2009 à 10:24
Non pour réaliser sa je lanec mon terminal et tape crontab -e