"test sys_refresh_ref_cron.sh"
This commit is contained in:
parent
26faf86213
commit
0c1471abac
@ -181,7 +181,7 @@ function refresh_cronjobs
|
||||
REQUEST_ID_PARAMS="host='${VM}' and s_user='${TETALAB_USER}' and minutes='${MINUTES}'
|
||||
and hours='${HOURS}' and days='${DAYS}' and daysofweek='${DAYSOFWEEKS}' and command='${COMMAND}'"
|
||||
RESULT=$(psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "select ID from ref_cron where ${REQUEST_ID_PARAMS};")
|
||||
if [ ${#RESULT} -gt 0 ];
|
||||
if [ ${#RESULT} -gt 0 ]; then
|
||||
fct_message "Cronjob not in database, inserting..."
|
||||
REQUEST_INSERT_PARAMS=$(echo ${REQUEST_ID_PARAMS} | sed -s 's/and/,/g')
|
||||
psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "insert in ref_cron values (${REQUEST_INSERT_PARAMS});"
|
||||
|
Loading…
Reference in New Issue
Block a user