Executer un script dans un crontab
ookahh1
Messages postés
61
Date d'inscription
Statut
Membre
Dernière intervention
-
dubcek Messages postés 18627 Date d'inscription Statut Contributeur Dernière intervention -
dubcek Messages postés 18627 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, est il possible d'ecrire un script dans un crontab et de l'executer en fonction du temps indiqué? un peu du genre:
shell=/bin/bash
mailto=root
home=/
1 * * * * stat -c " %n ----------------------- %y " document/* > rppt.txt | mail -s" envoi du rapport " toto@localhost < rppt.txt
merci
shell=/bin/bash
mailto=root
home=/
1 * * * * stat -c " %n ----------------------- %y " document/* > rppt.txt | mail -s" envoi du rapport " toto@localhost < rppt.txt
merci
2 réponses
-
Salut,
et de l'executer en fonction du temps indiqué?
C'est à dire ? De quel temps parles-tu ? -
hello
il faut protéger les % dans un crontab1 * * * * stat -c " \%n ----------------------- \%y " document/*| mail -s" envoi du rapport " toto@localhost man -s 5 crontab
Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters