Hello,
Y a t il un moyen de lancer un script via un cron paramétré pour se lancer à heure fixe qui fait appel aux actions via le click 'executer maintenant' pour le cron ? Ou dir autrement : lancement d'un cron manuel par un cron programmé
En effet, cela serait une solution à mon soucis de zrep. La commande zrep sync all ou un script l'utilisant fonctionne parfaitement avec 'executer maintenant' et rien ne se passe avec la programmation horaire.
En appelant l'executer maintenant je suis sur que cela marcherait.
In fine ce n'est pas les variables d'environnement (mais je suis intéressé pour les réponses à mes questions (cf autre post)) car un scp entre mais 2 nas (copie par ssh de fichier) a parfaitement fonctionné en manuel et en programmé.
Donc la connexion ssh avec clé fonctionne en cron programmé.
Le lancement d'un cron manuel par un cron programmé solutionnerait mon cas.
Si vous avez d'autres idées ?
PS : peut être un bug de la version 1349 ? Karlandtanya m'aide beaucoup sur ce point et chez lui cela fonctionne sans soucis. Je ne sais pas encore quelle version il a.
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
[RESOLU] cron
Moderators: velivole18, ernie, mtiburs
- ernie
- Forum Moderator

- Posts: 1458
- Joined: 26 Aug 2012 19:09
- Location: France - Val d'Oise
- Status: Offline
[RESOLU] cron
Last edited by ernie on 08 May 2015 14:41, edited 1 time in total.
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)
-
laster13
- PowerUser

- Posts: 995
- Joined: 01 Jun 2013 19:15
- Location: France-Marseille
- Status: Offline
Re: cron
Tu as la possibilité de lancer un cron en utilisant le fichier "etc/crontab" et dedans tu mets une ligne qui pourrait ressembler à ça :
Les premiers chiffres déterminent le jour, heure minute etc...
Sauf qu'en embeeded le fichier risque de s'effacer à chaque redémarrage. Peut être utiliser la méthode de vélivole pour le recréer sur le pool à chaque reboot.
viewtopic.php?f=94&t=7883
Regarde ces exemples
https://www.pantz.org/software/cron/croninfo.html
Code: Select all
00 3 * * * root /usr/local/bin/sa-updateSauf qu'en embeeded le fichier risque de s'effacer à chaque redémarrage. Peut être utiliser la méthode de vélivole pour le recréer sur le pool à chaque reboot.
viewtopic.php?f=94&t=7883
Regarde ces exemples
https://www.pantz.org/software/cron/croninfo.html
- ernie
- Forum Moderator

- Posts: 1458
- Joined: 26 Aug 2012 19:09
- Location: France - Val d'Oise
- Status: Offline
Re: cron
Merci et il est correctement rempli:
24 16 * * * root /mnt/pool1/sup/script/zrep sync all
0 7 * * * root /mnt/pool1/sup/script/synchro2
Mais que cela soit via la commande directe ou via le script, rien n'y fait. Pour la commande j'ai aussi utilisé le chemin /usr/local/sbin ou bin car il contient aussi zrep (lien symbolique avec celui présent sur pool1.
La commande executer maintenant de cron appelle quel fichier ?
24 16 * * * root /mnt/pool1/sup/script/zrep sync all
0 7 * * * root /mnt/pool1/sup/script/synchro2
Mais que cela soit via la commande directe ou via le script, rien n'y fait. Pour la commande j'ai aussi utilisé le chemin /usr/local/sbin ou bin car il contient aussi zrep (lien symbolique avec celui présent sur pool1.
La commande executer maintenant de cron appelle quel fichier ?
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)
- ernie
- Forum Moderator

- Posts: 1458
- Joined: 26 Aug 2012 19:09
- Location: France - Val d'Oise
- Status: Offline
Re: cron
Résolu via des variables d'environnement
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2
Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)