![]() ![]() |
![]() |
File: [Development] / JSOC / proj / workflow / add_scripts / add_clock
(download)
Revision: 1.2, Thu Jan 6 18:50:29 2011 UTC (12 years, 1 month ago) by phil Branch: MAIN CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-4, Ver_8-3, Ver_8-2, Ver_8-12, Ver_8-11, Ver_8-10, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2, Ver_6-1, Ver_6-0, Ver_5-14, Ver_5-13, HEAD Changes since 1.1: +2 -0 lines Modify for script names instead of links for command, manager, and statustask |
#! /bin/csh -f # # WARNING - do not run this while gatekeeper is active set echo # script to add an clock, a clock that keeps time. set WFDIR = $WORKFLOW_DATA set WFCODE = $WORKFLOW_ROOT cd $WFDIR # remove prior test version if (-e tasks/clock_task) rm -rf tasks/clock_task if (-e gates/clock_gate) rm -rf gates/clock_gate # get current hour slot set NOW = `date -u +%Y.%m.%d_%H:%M:%S` # make clock status task # this status task will set the high value of the oclock gate to the current time. cat > $WFCODE/scripts/status_clock.csh << ENDSCRIPT #! /bin/csh -f # the clock status task simply reflects the current time set WFDIR = $WORKFLOW_DATA cd $WFDIR/gates/\$1 set NOW = \`date -u +%Y.%m.%d_%H:%M:%S\` echo \$NOW > high echo \$NOW > lastupdate rm -f statusbusy ENDSCRIPT chmod +x $WFCODE/scripts/status_clock.csh # make the clock task maketask.csh task=clock_task \ manager=taskmanager.csh \ target=clock_gate \ maxrange=86400 \ command=scripts/true.csh # make the clock gate # # WARNING - updelta MUST be more than the gatekeeper basic loop time or the clock will never process # new tickets! makegate.csh gate_name=clock_gate \ product=none \ type=time \ key=NA \ low=1993 \ high=$NOW \ updatedelta=15 \ actiontask=clock_task \ statustask=scripts/status_clock.csh # initialization tickets not needed. enablegate.csh clock_gate
Karen Tian |
Powered by ViewCVS 0.9.4 |