It doesn't have to be a FT job. Any jobs in the box will do.
- Set the variable PIERRE to "TEST"
- Put this in autoisys :
/* ----------------- FCDQ_test_pierre ----------------- */
insert_job: FCDQ_test_pierre job_type: BOX
owner: ba7umxr
permission: gx
box_success: v(PIERRE) = "STOP" | s(FCDQ_test_pierre_10_1)
description: "DEV_aucun% Test pour mettre variable globale dans une commandes"
alarm_if_fail: 0
/* ----------------- FCDQ_test_pierre_10_1 ----------------- */
insert_job: FCDQ_test_pierre_10_1 job_type: CMD
box_name: FCDQ_test_pierre
command: sleep 30
machine: dagesnf001.dev.desjardins.com
owner: ba7umxr
permission: gx,ge
date_conditions: 0
condition: v(STOP_DAGESNF001) = "NO" & v(PIERRE) = "NOT"
description: "DEV_aucun% test pour date dans commande"
std_out_file: >/home/ba7umxr/rpt/$$DATE_JOUR.${AUTO_JOB_NAME}.${AUTORUN}.out
std_err_file: >/home/ba7umxr/rpt/$$DATE_JOUR.${AUTO_JOB_NAME}.${AUTORUN}.out
alarm_if_fail: 0
- force start the box
- The job in the box will be in AC mode, the box will be RUNNING.
- Change the value of PIERRE to STOP
- On my side, the box keeps on running!
log :
[06/15/2016 07:35:00] ----------------------------------------
[06/15/2016 07:36:00] ----------------------------------------
[06/15/2016 07:36:03] CAUAJM_I_40245 EVENT: FORCE_STARTJOB JOB: FCDQ_test_pierre
[06/15/2016 07:36:04] CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: RUNNING JOB: FCDQ_test_pierre
[06/15/2016 07:36:26] CAUAJM_I_40245 EVENT: SET_GLOBAL GLOBAL: PIERRE = STOP
[06/15/2016 07:37:00] ----------------------------------------
[06/15/2016 07:38:00] ----------------------------------------
box still running :
ob Name Last Start Last End ST Run/Ntry Pri/Xit
____________________________ ____________________ ____________________ __ ________ _______
FCDQ_test_pierre 06/15/2016 07:36:03 ----- RU 1564/1
FCDQ_test_pierre_10_1 ----- ----- AC 1564/0