diff --git a/README.md b/README.md index dc9cbc9..5c3dc28 100644 --- a/README.md +++ b/README.md @@ -62,20 +62,21 @@ npm run cron:search # construction des chunks de recherche npm run cron:ambiguity # detection des doublons (CSV) ``` -Crontab système recommandée : +Crontab système recommandée (remplace `/chemin/vers/proxytmdb` par le +chemin absolu d'installation) : ``` -13 13 * * * /home/matt/_WEB/proxytmdb/cron/run.sh > /home/matt/_WEB/proxytmdb/lastcron.txt 2>&1 +13 13 * * * /chemin/vers/proxytmdb/cron/run.sh > /chemin/vers/proxytmdb/lastcron.txt 2>&1 ``` Le wrapper [cron/run.sh](cron/run.sh) charge nvm puis lance Node sur la version `nvm alias default` — pratique si tu mets à jour Node via nvm, le cron suivra automatiquement. -Si tu n'utilises pas nvm, remplace par : +Si tu n'utilises pas nvm : ``` -13 13 * * * cd /home/matt/_WEB/proxytmdb && /usr/bin/node --env-file-if-exists=.env cron/runAll.js > lastcron.txt 2>&1 +13 13 * * * cd /chemin/vers/proxytmdb && /usr/bin/node --env-file-if-exists=.env cron/runAll.js > lastcron.txt 2>&1 ``` ## Endpoints HTTP diff --git a/cron/run.sh b/cron/run.sh index 1b5663d..c114b0d 100755 --- a/cron/run.sh +++ b/cron/run.sh @@ -3,8 +3,8 @@ # Wrapper de lancement du cron pour environnement nvm. # Cron n'a pas le PATH de nvm — ce script charge nvm puis lance le cron Node. # -# Utilisation crontab : -# 13 13 * * * /home/matt/_WEB/proxytmdb/cron/run.sh > /home/matt/_WEB/proxytmdb/lastcron.txt 2>&1 +# Utilisation crontab (remplace /chemin/vers/proxytmdb) : +# 13 13 * * * /chemin/vers/proxytmdb/cron/run.sh > /chemin/vers/proxytmdb/lastcron.txt 2>&1 set -e