Crontab ne marche pas
Tony85
Messages postés
72
Date d'inscription
Statut
Membre
Dernière intervention
-
dubcek Messages postés 18789 Date d'inscription Statut Contributeur Dernière intervention -
dubcek Messages postés 18789 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour à tous et à toutes
Voici mon probleme j'essai de configurer un crontab exécutant mon script arret_pc.sh voici comment je proccède :
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
59 23 * * * /home/administrateur/Bureau/arret_pc.sh
?
59 23 * * * /home/administrateur/Bureau/arret_pc.sh >> /tmp/log.txt
?
J'arrive pas a compredre pourquoi ma configuration n'est pas prise en compte ???
Si vous avez des idées.....
Merci d'avance
Voici mon probleme j'essai de configurer un crontab exécutant mon script arret_pc.sh voici comment je proccède :
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
59 23 * * * /home/administrateur/Bureau/arret_pc.sh
?
59 23 * * * /home/administrateur/Bureau/arret_pc.sh >> /tmp/log.txt
?
J'arrive pas a compredre pourquoi ma configuration n'est pas prise en compte ???
Si vous avez des idées.....
Merci d'avance
A voir également:
- No crontab for
- Downloader for pc - Télécharger - Téléchargement & Transfert
- No signal tv - Guide
- Idm for mac - Télécharger - Téléchargement & Transfert
- Copytrans heic for windows - Télécharger - Visionnage & Diaporama
- Instagram for pc - Télécharger - Divers Communication
24 réponses
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
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
?
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
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).
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
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
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
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
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
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 ????
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