c [2,20]RUNBATCH.FTN R RHODERICK AUG 1982 c USEPA/HERL/NTD c MD74B c Research Triangle Park, NC 27711 c Program to disable BATCH processing from 7:00 am to 5:00 pm daily. c Program schedules itself to run when it needs to enable/disable c the BATCH processor, then exits. When MCR again runs it, this c program sends an intertask message to the BATCH Queue Manager task c (BQM...), then reschedules itself and exits, and so on... c This task's installed name must be defined in the DATA statement, below. c Suggest invoking this task at system boot, in LB:[1,2]STARTUP.CMD, ie: c INS $RUNBATCH c RUN RUNBAT real bqm,tsknam character line*39,tim*8,ttnum*2 integer*2 rec13(13) data ttnum/'56'/ !terminal number to log batch jobs to data line/'cTTnn'/ data bqm,tsknam/6rBQM...,6rRUNBAT/ call canall(tsknam) !make sure we're not multiply scheduled c--get time of day, figure whether to enable or disable batch processor call time(tim) read(tim,10)ihr,imn 10 format(i2,x,i2) i=ihr*60+imn line(2:3)=ttnum(1:2) !put terminal number in cmd block line(1:1)='C' !initially set to Disable BATCH if(i.lt.420.or.i.ge.1020)line(1:1)='E' !set to Enable BATCH c--unstop batch queue manager task & send command to it 950 call irad50(39,line,rec13) call send(bqm,rec13) call ustp(bqm,ier) c--now schedule this task to again run at 7:00 am or 5:00 pm (whichever's next) if(line(1:1).eq.'C')then i=1020-i else i=420-i if(i.lt.0)i=i+1440 endif call run(tsknam,,i,3) end