Browse Source

"test sys_refresh_ref_cron.sh"

master
Doug Le Tough 5 years ago
parent
commit
0a85975992
  1. 3
      bin/sys_refresh_ref_cron.sh

3
bin/sys_refresh_ref_cron.sh

@ -181,7 +181,8 @@ function refresh_cronjobs @@ -181,7 +181,8 @@ function refresh_cronjobs
RESULT=$(psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "select ID from ref_cron where ${REQUEST_ID_PARAMS};")
if [ ${#RESULT} -eq 0 ]; then
fct_message "Cronjob not in database, inserting..."
REQUEST_INSERT_PARAMS=$(echo ${REQUEST_ID_PARAMS} | sed -s 's/and/,/g')
REQUEST_INSERT_PARAMS="host='${VM}', s_user='${TETALAB_USER}', minutes='${MINUTES}',
hours='${HOURS}', days='${DAYS}', daysofweek='${DAYSOFWEEKS}', command='${COMMAND}'"
psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "insert into ref_cron values (${REQUEST_INSERT_PARAMS});"
else
fct_message "Cronjob already in database"

Loading…
Cancel
Save