"test sys_refresh_ref_cron.sh"
This commit is contained in:
parent
4532c10cb3
commit
feafb53fb6
@ -169,13 +169,12 @@ function refresh_cronjobs
|
||||
fct_message ${MESSAGE} -color ${COLOR}
|
||||
if [ ${#CRONJOB} -gt 0 ]; then
|
||||
fct_message "Checking database:"
|
||||
CRONJOB="$@"
|
||||
MINUTES=$(echo ${CRONJOB} | awk -F ' ' '{print $1}')
|
||||
HOURS=$(echo ${CRONJOB} | awk -F ' ' '{print $2}')
|
||||
DAYS=$(echo ${CRONJOB} | awk -F ' ' '{print $3}')
|
||||
MONTHS=$(echo ${CRONJOB} | awk -F ' ' '{print $4}')
|
||||
DAYOFWEEK=$(echo ${CRONJOB} | awk -F ' ' '{print $5}')
|
||||
COMMAND=$(echo ${CRONJOB} | awk -F ' ' '{$1=$2=$3=$4=$5=""; print $0}')
|
||||
MINUTES=$(echo ${CRONJOB} | cut -d' ' -f1)
|
||||
HOURS=$(echo ${CRONJOB} | cut -d' ' -f2)
|
||||
DAYS=$(echo ${CRONJOB} | cut -d' ' -f3)
|
||||
MONTHS=$(echo ${CRONJOB} | cut -d' ' -f4)
|
||||
DAYOFWEEK=$(echo ${CRONJOB} | cut -d' ' -f5)
|
||||
COMMAND=$(echo ${CRONJOB} | cut -d' ' -f6-)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user