"test sys_refresh_ref_cron.sh"

This commit is contained in:
Doug Le Tough 2017-07-25 12:31:15 +02:00
parent 0a85975992
commit 1dcbc6e2db

View File

@ -181,8 +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="host='${VM}', s_user='${TETALAB_USER}', minutes='${MINUTES}',
hours='${HOURS}', days='${DAYS}', daysofweek='${DAYSOFWEEKS}', command='${COMMAND}'"
REQUEST_INSERT_PARAMS="'${VM}', '${TETALAB_USER}', '${MINUTES}',
'${HOURS}', '${DAYS}', '${DAYSOFWEEKS}', '${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"