logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 31-12-2016 09:37:45

justclo
Membre
Inscription : 19-10-2012

LAncer script via crontab

Bonjour, je tente d'utiliser crontab sur mon pc, mais rien a faire,

un script  simple  comme lancer iceweasel, bien entendu ce n'est pas le script, c'est juste un exemple !

#!/bin/sh
iceweasel
 



Mon crontab à 8h48 par exemple
                           


# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
#

# dans mon utilisateur
48 8     * * *  /home/justclo/.SCRIPT/upload_SAUVSQL.sh

# ou dans le /usr/local/bin/
55 8     * * *  upload_SAUVSQL.sh

 



Bien entendu, je rend mon scrpit utilisable
chmod +x /usr/local/bin/upload_SAUVSQL.sh
et je reload cron
/etc/init.d/cron restart

J'utilise crontab sur d'autre serveur, mais ici ca veut pas
Merci de votre aide

Dernière modification par justclo (31-12-2016 10:21:50)

Hors ligne

#2 03-01-2017 23:03:57

moi4567
Membre
Distrib. : Jessie
Noyau : Linux 3.16.0-4-amd64
(G)UI : Gnome 3
Inscription : 22-06-2015

Re : LAncer script via crontab

Salut,

As tu essayé de mettre en place un système de log pour le script de ton cron? Ca te permetrait de voir si il s'éxéctute ou si ça bloque avant.

Exemple:

command > /var/log/cron_script.log

Hors ligne

#3 04-01-2017 03:39:27

smolski
quasi...modo
Lieu : AIN
Distrib. : backports (buster) 10
Noyau : Linux 4.19.0-8-amd64
(G)UI : gnome
Inscription : 21-10-2008

Re : LAncer script via crontab

Que donne :

ls -l /usr/local/bin/upload_SAUVSQL.sh


Voir les droits une fois...

... ashamed0007.gif


saque eud dun (patois chtimi : fonce dedans)

Hors ligne

Pied de page des forums