cronjob: migrate other scripts to the new console

also remove the need of hardcoded folders in these scripts (/var/web)

and the script alias which doesnt work on all bash systems
This commit is contained in:
Tanguy Pruvot 2017-07-30 22:57:41 +02:00
parent 5f95cc1d7c
commit 2f39b463b5
3 changed files with 21 additions and 8 deletions

View file

@ -1,10 +1,15 @@
#!/bin/bash
alias php5='php -d max_execution_time=60'
PHP_CLI='php -d max_execution_time=60'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
date
echo started in ${DIR}
cd /var/web
while true; do
php5 run.php cronjob/runBlocks
${PHP_CLI} runconsole.php cronjob/runBlocks
sleep 20
done
exec bash

View file

@ -2,9 +2,12 @@
PHP_CLI='php -d max_execution_time=120'
date
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
date
echo started in ${DIR}
cd /var/web
while true; do
${PHP_CLI} runconsole.php cronjob/runLoop2
sleep 60

View file

@ -1,10 +1,15 @@
#!/bin/bash
alias php5='php -d max_execution_time=120'
PHP_CLI='php -d max_execution_time=120'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
date
echo started in ${DIR}
cd /var/web
while true; do
php5 run.php cronjob/run
${PHP_CLI} runconsole.php cronjob/run
sleep 90
done
exec bash