From 0a85975992732e2485e4b1cc96d0047042003a37 Mon Sep 17 00:00:00 2001 From: Doug Le Tough Date: Tue, 25 Jul 2017 12:29:42 +0200 Subject: [PATCH] "test sys_refresh_ref_cron.sh" --- bin/sys_refresh_ref_cron.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sys_refresh_ref_cron.sh b/bin/sys_refresh_ref_cron.sh index 6b9b335..e939751 100755 --- a/bin/sys_refresh_ref_cron.sh +++ b/bin/sys_refresh_ref_cron.sh @@ -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"