"test sys_refresh_ref_cron.sh"
This commit is contained in:
parent
0a85975992
commit
1dcbc6e2db
@ -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};")
|
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
|
if [ ${#RESULT} -eq 0 ]; then
|
||||||
fct_message "Cronjob not in database, inserting..."
|
fct_message "Cronjob not in database, inserting..."
|
||||||
REQUEST_INSERT_PARAMS="host='${VM}', s_user='${TETALAB_USER}', minutes='${MINUTES}',
|
REQUEST_INSERT_PARAMS="'${VM}', '${TETALAB_USER}', '${MINUTES}',
|
||||||
hours='${HOURS}', days='${DAYS}', daysofweek='${DAYSOFWEEKS}', command='${COMMAND}'"
|
'${HOURS}', '${DAYS}', '${DAYSOFWEEKS}', '${COMMAND}'"
|
||||||
psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "insert into ref_cron values (${REQUEST_INSERT_PARAMS});"
|
psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "insert into ref_cron values (${REQUEST_INSERT_PARAMS});"
|
||||||
else
|
else
|
||||||
fct_message "Cronjob already in database"
|
fct_message "Cronjob already in database"
|
||||||
|
Loading…
Reference in New Issue
Block a user