Subj : dayboot1 question To : Mark Lewis From : Gerald Miller Date : Sun Nov 30 2003 10:23 am Hello Mark, On Wednesday November 26 2003 at 16:37, Mark Lewis [1:3634/12] wrote to Gerald Miller, about: dayboot1 question [snip] ML> i see... looks like i may have to do something similar to what i do in ML> some of my programs that require to know the day of the month... ML> hummm... then again, maybe not... 4DOS knows what the day of the month ML> is... ML> @DAY[mm-dd-yy] Day of the month ML> it should be possible to work that into dayboot1 so that one can use x ML> days between runs or certain day's of the month... ML> echo %_date ML> 11-26-03 ML> echo %@day[%_date] ML> 26 ML> looks right to me... now to figure out how to denote a specific date ML> in the .dat file... [looking] well... you use a + to show every X ML> days... maybe an = to denote the exact day of the month? ML> [** SAMPLE **] ML> PATH\PROGRAM TO RUN ³AFTER³ ³ ³DAYS ³ ML> ³ DAYS³LAST RUN³NEXT RUN³ LEFT³ASK ML> ÄÄÄÄ 001 ÄÄÄÄÄÄÄ Time: 13:07:59 ÄÄÄÄÅÄÄÄÄÄÅMM-DD-YYÅMM-DD-YYÅÄÄÄÄÄÅÄÄÄ ML> STEP_0.BTM ³1 ³11-22-03³11-23-03³1 ³N ML> STEP_1.BTM ³1 ³11-22-03³11-23-03³1 ³N ML> STEP_2.BTM ³+7 ³11-16-03³11-23-03³1 ³Y ML> STEP_3.BTM ³+14 ³11-09-03³11-23-03³1 ³N ML> STEP_4.BTM ³+14 ³11-16-03³11-30-03³8 ³ ML> 26TH.BTM ³=26 ³11-26-03³12-26-03³30 ³ ML> [** END SAMPLE **] ML> hummm... looks like it would work to me? what about to you? i haven't ML> looked into the code and would have to learn it before attempting to ML> put this mod in... seems like it should be easy enough to do... ML> so, what do you say? add a great enhancement to an already good util? I've got the flu and I'm taking a few days off.... If you don't want to enter 26th.btm into the data file twelve times (much more accurate), then put it in once and call 26th.btm everyday (with the following [_untried_] adjustments); until dayboot can be revised. The "theory" of the following snippet is: if the current day of today's date is the 26th, then check to see if the flag file exists (don't want to run the batch more than once). If the flag exists, then quit the batch; if the flag does NOT exist, then create the flag and run the batch. If the flag exists and if the current day of today's date is NOT the 26th, then delete the flag and quit the batch. === Cut 26TH.BTM === :: The following *_should_* create a zero byte flag file in the same drive / :: directory (named 26TH.FLG) as the 26TH.BTM file set flagfile=%@path[%@search[%0]]%@upper[%@name[%0]].FLG iff %_day[%date] == 26 then :: or maybe the above line has to be "iff %@day[%_date] == 26 then" (both :: #_may_# yield the same results) - /play/ with it. iff exist %flagfile then quit else goto Now endiff else iff exist %flagfile then goto Remov_flag else quit endiff endiff :Now rem>%flagfile goto Start :Remov_flag if exist %flagfile del/q %flagfile :: The following should stop your batch from running after you remove the :: flag when the day is NOT the 26th... iff %_day[%date] ne 26 then :: or maybe the above line has to be "iff %@day[%_date] ne 26 then" (both :: #_may_# yield the same results) - /play/ with it. quit else endiff :Start :: the rest of your batch after this.... === Cut 26TH.BTM === Let me know if that works for you. Cheers ... Gerald .... Conservative: one who'd rather have 8% unemployment than 8% inflation. --- GoldED+/DPMI32 v1.1.5-30512 * Origin: Condominiums are not effective birth control. (1:342/512) .