mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
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:
parent
5f95cc1d7c
commit
2f39b463b5
3 changed files with 21 additions and 8 deletions
|
@ -1,10 +1,15 @@
|
||||||
#!/bin/bash
|
#!/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
|
while true; do
|
||||||
php5 run.php cronjob/runBlocks
|
${PHP_CLI} runconsole.php cronjob/runBlocks
|
||||||
sleep 20
|
sleep 20
|
||||||
done
|
done
|
||||||
exec bash
|
exec bash
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
|
|
||||||
PHP_CLI='php -d max_execution_time=120'
|
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
|
while true; do
|
||||||
${PHP_CLI} runconsole.php cronjob/runLoop2
|
${PHP_CLI} runconsole.php cronjob/runLoop2
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
11
web/main.sh
11
web/main.sh
|
@ -1,10 +1,15 @@
|
||||||
#!/bin/bash
|
#!/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
|
while true; do
|
||||||
php5 run.php cronjob/run
|
${PHP_CLI} runconsole.php cronjob/run
|
||||||
sleep 90
|
sleep 90
|
||||||
done
|
done
|
||||||
exec bash
|
exec bash
|
||||||
|
|
Loading…
Add table
Reference in a new issue