home *** CD-ROM | disk | FTP | other *** search
/ Lion Share / lionsharecd.iso / utils_mz / runonday.zip / RUNONDAY.DOC next >
Text File  |  1989-10-24  |  11KB  |  358 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                     
  7.  
  8.  
  9.  
  10.                      R U N   O N    D A Y   1 . 0
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                           Compiled  10/24/89
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.    By:
  29.  
  30.    Keith Luken
  31.    35 Cedar Ave.
  32.    Leonardo, NJ 07737-1109
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                   PHANTASM BBS
  51.         201-291-2302 USR DUAL STANDARD  |  201-291-4134 HAYES 9600 V.42
  52.  
  53.  
  54.                                               (C)1989 PHANTASM Software
  55.  
  56.  
  57.  
  58.  
  59.     Regular system maintainence is the key to a GOOD effective BBS. Too much
  60.     system maintainence is OVERKILL! With this in mind I set out to create
  61.     RUN ON DAY. While the daily event accomplishes many necessary functions
  62.     everytime it is run, some functions do not need to be run EVERY day. The
  63.     least important function to run every day is packing message bases! While
  64.     even on a NET MAIL system of some type your message bases will grow fast, it
  65.     is unlikely that the space it take up every day is that much to justify
  66.     packing ALL your message bases every day. If you don't pack them everyday
  67.     then you probably wind up doing it manually when you find the time. This
  68.     usually leads to the other extreme where your message bases are not being
  69.     packed often enough and you are wasting valuable disk space! Also even
  70.     PROPACK which packs bases very fast still can take several minutes to pack
  71.     your message bases. Also packing message bases usually involves high disk
  72.     intensive activity creating additional wear on your disk drive.
  73.  
  74.     Sure all this is trivial during each event, but add up all that time saved
  75.     and the thousands of disk accesses you save by packing your message bases
  76.     only 2 out of 7 days, or 1 out of 7 days! RUN ON DAY does  that, it allows
  77.     you to tailor your event to run certain programs on certain days only. And
  78.     if you are creative with your batch files you can use RUN ON DAY several
  79.     different times in your event to spread different programs out over the
  80.     entire week! RUN ON DAY is easy to use and requires no special installation.
  81.     While RUN ON DAY was written with packing message bases in mind it can be
  82.     used for just about anything that you want to trigger on only specific days!
  83.  
  84.     RUNONDAY looks in the DOS enviornment for up to 7 different variables that
  85.     you define. The variables can be anything you want since you will tell
  86.     RUNONDAY what variables to look for when you start it up on command line.
  87.     I recommend using variables that will be self explanatory when viewed as not
  88.     to confuse you at a later date. When you define the variables you MUST and a
  89.     number from 1 to 7 on the end! ONLY ADD THE NUMBER WHEN YOU SET VARIABLES!
  90.        ex. SET DAYTOGETMAIL1=MONDAY
  91.            SET DAYTOGETMAIL2=WEDNESDAY
  92.  
  93.     When you start RUNONDAY you follow it on the command line with the VARIABLE
  94.     you set WITHOUT the trailing number!
  95.        ex.  RUNONDAY DAYTOGETMAIL
  96.  
  97.     RUNONDAY will automatically scan for your variable followed by the numbers
  98.     1 to 7. You may use any number of variables you wish up to 7. If you only
  99.     choose 1 then it will only look for 1.
  100.     When it finds the variables it compares them to the present day to
  101.     determine if today's day is one of those in the variables. If it is RUNONDAY
  102.     creates a one line text file called "DOITKNOW.TXT". By using a statement-
  103.     IF EXIST DOITKNOW.TXT GOTO .... statement in your batch file you can allow
  104.     the batch file to branch only on specified days. ** IT is IMPORTANT that as
  105.     soon as your BATCH file branches the first thing it should do is ERASE
  106.     DOITKNOW.TXT to prevent the next check for this file to be triggered by
  107.     accident!!!!  Now RUNONDAY can have many different uses. It is not just for
  108.     BBS's. You could have it run in an AUTOEXEC.BAT so that on certain days when
  109.     you turn on your computer it might perform file maintainence. The uses are
  110.     limitless.
  111.     
  112.  
  113.  
  114.  
  115.  
  116.   HOW TO USE....
  117.  
  118.     RUN ON DAY is run without any configuration files! To properly operate
  119.     you need only use the "SET" statement of DOS to load the variables.
  120.  
  121.  
  122.        SET PACKDAY1=SUNDAY
  123.        SET PACKDAY2=Wednesday
  124.        SET OptimizeDay1=MonDay
  125.  
  126.     Notice I used one in UPPER CASE and the others in mixed case. RUNONDAY is
  127.     NOT case sensitive. The day however must be spelled out COMPLETLEY and
  128.     correctly for RUNONDAY to work. If you wish to only have less than 7 days as
  129.     a trigger then you can use any variable suffix 1-7 and don't enter
  130.     anything for the others. RUNONDAY will look for ALL 7 variables, but it WILL
  131.     NOT error if all are not found. It will just use the ones it found.
  132.     To Verify your choices and the current day RUNONDAY first displays
  133.     your varaibles as it read them from the DOS enviornment then it shows
  134.     you what today's date is for comparison. When complete RUNONDAY displays a
  135.     message informing you if it found a match for today or not. Sounds simple
  136.     enough right... right. Now for some examples of how it can be set up to do
  137.     different things........
  138.  
  139.  
  140.     ** NOTE - Unlike RUN ON DAY's predecessors MAILSAVE and SAVEPACK you can
  141.               run RUNONDAY over and over without resetting variables.
  142.               By passing the variable name to RUNONDAY from the command line you
  143.               can use it many times in same batch file as long as all your
  144.               variables are different. The last example shows how you can SET up
  145.               all the variables from your autoexec and then have them called
  146.               whenever the batch file runs. This allows much greater
  147.               flexibility.
  148.  
  149.  
  150.  
  151.  
  152.  
  153. EXAMPLES.........
  154.  
  155.  
  156.    Example 1 -  This bat file is called TRANSFER.BAT on my system and is run in
  157.                 my EVENT daily. It performs a RelayNet(tm) mail run and verifies
  158.                 that it completed a successful mail import, then it runs
  159.                 RUNONDAY to compare the day and if it matches it branches to do
  160.                 PROPACK of my message bases.
  161.  
  162. CD c:\PCB\RELAY
  163. c:
  164. copy lasttime.txt lastmail.txt
  165. erase lasttime.txt
  166. CALL EXPORT
  167. CD H:\COMM\RELAY
  168. H:
  169. QMODEM /S=Q4RLY.SCR
  170. c:
  171. cd c:\pcb\relay
  172. CALL IMPORT
  173. c:
  174. if exist c:\pcb\relay\lasttime.txt goto DayCheck
  175. goto end
  176. :DayCheck
  177. SET PACKDAY1=SUNDAY
  178. SET PACKDAY2=THURSDAY
  179. RUNONDAY PACKDAY               (*NOTE- DO NOT ADD THE VARIABLE NUMBER HERE)
  180. if exist DOITKNOW.TXT goto PACK
  181. goto end
  182. :PACK
  183. erase DOITKNOW.TXT
  184. cd c:\pcb\prod
  185. call PACKALL
  186. cd c:\pcb\relay
  187. :END
  188. cls
  189.  
  190.  
  191.  
  192.    Example 2 -  This is an EVENT batch file that uses SAVEPACK several times to
  193.                 spread certain programs out over the entire week. First it uses
  194.                 it to see if this is the day to do a mail run. Second it checks
  195.                 to see if this is ONE day a week to RE-COLOR the directories.
  196.                 Notice that when running RUNONDAY more than once you no longer
  197.                 have to worry about conflicting variables. By using different
  198.                 variable names you eliminate chance of conflict.
  199.  
  200. cd l:\pcb\doors\tw1000
  201. twmaint /m
  202. cd l:\pcb
  203. SET MAILDAY1=TUESDAY
  204. SET MAILDAY2=FRIDAY
  205. SET MAILDAY3=SUNDAY
  206. RUNONDAY MAILDAY
  207. if exist DOITKNOW.TXT goto MailRun
  208. goto Ratio
  209. :MailRun
  210. erase DOITKNOW.TXT
  211. CALL TRANSFER
  212. :Ratio
  213. cd l:\pcb
  214. pcbsm /ADJUST;FILERATIO
  215. SET UserRatioDay1=TUESDAY
  216. SET UserRatioDay2=SUNDAY
  217. RUNONDAY UserRatioDay
  218. if exist DOITKNOW.TXT goto Directories
  219. goto End
  220. :Directories
  221. erase DOITKNOW.TXT
  222. cd l:\pcb
  223. WGM-DMS l:\PCB\PCBOARD.DAT
  224. :End
  225.  
  226.   EXAMPLE 3 -  This is a sample AUTOEXEC.BAT that would run twice a week to
  227.                defragment a hard disk. If you do little file updating then maybe
  228.                once a week would be enough to defragment your hard disk.
  229.  
  230. Prompt $P$G
  231. path= C:\dos;c:\util
  232. Share
  233. Verify On
  234. C:\dos\Fastopen C:=50,D:=25
  235. SET OptimizeDay1=Monday
  236. SET OptimizeDay2=Thursday
  237. RUNONDAY OptimizeDay
  238. if exist DOITKNOW.TXT goto Optimize
  239. goto End
  240. :Optimize
  241. erase DOITKNOW.TXT
  242. VOPT C:
  243. VOPT D:
  244. :End
  245. PC-CACHE /Sizext=512K /IA /IB /Max=4
  246. cls
  247.  
  248.  
  249.   EXAMPLE 4 - This is a total setup that shows how you can set variables in the
  250.               AUTOEXEC for all possible batch runs.
  251. (AUTOEXEC.BAT)
  252.  
  253. Prompt $P$G
  254. path= C:\dos;c:\util
  255. Share
  256. Verify On
  257. C:\dos\Fastopen C:=50,D:=25
  258. SET MAILDAY1=TUESDAY
  259. SET MAILDAY2=THURSDAY
  260. SET MAILDAY3=SUNDAY
  261. SET PACKDAY1=TUESDAY
  262. SET USERRATIODAY1=Wednesday
  263. SET COLORDIRS1=FRIDAY
  264. SET OptimizeDay1=Monday
  265. SET OptimizeDay2=Friday
  266. RUNONDAY OptimizeDay
  267. if exist DOITKNOW.TXT goto Optimize
  268. goto End
  269. :Optimize
  270. erase DOITKNOW.TXT
  271. VOPT C:
  272. VOPT D:
  273. :End
  274. PC-CACHE /Sizext=512K /IA /IB /Max=4
  275. cls
  276.  
  277.  (EVENT.SYS)    ** PCBoard Daily Event Batch File **
  278.  
  279. cd l:\pcb\doors\tw1000
  280. twmaint /m
  281. cd l:\pcb
  282. RUNONDAY MAILDAY
  283. if exist DOITKNOW.TXT goto MailRun
  284. goto Ratio
  285. :MailRun
  286. erase DOITKNOW.TXT
  287. CALL TRANSFER
  288. RUNONDAY Packday
  289. if exist DOITKNOW.TXT goto PACK
  290. goto Ratio
  291. :PACK
  292. erase DOITKNOW.TXT
  293. c:\pcb\prod\PACKALL
  294. :Ratio
  295. cd l:\pcb
  296. RUNONDAY UserRatioDay
  297. if exist DOITKNOW.TXT goto Users
  298. goto Dirs
  299. :Users
  300. erase DOITKNOW.TXT
  301. pcbsm /ADJUST;FILERATIO
  302. :Dirs
  303. RUNONDAY ColorDirs
  304. if exist DOITKNOW.TXT goto Directories
  305. goto End
  306. :Directories
  307. erase DOITKNOW.TXT
  308. cd l:\pcb
  309. WGM-DMS l:\PCB\PCBOARD.DAT
  310. :End
  311.  
  312.   WARRANTY........
  313.  
  314.     As usually this product is distributed AS IS with no WARRANTY as to
  315.     performance. You assume FULL responsibility for the integrity of this
  316.     product. The author assumes NO responsibility for any damages done due to
  317.     the use of this product.
  318.  
  319.  
  320.   SUGGESTIONS AND UPDATES........
  321.  
  322.     I am always open to suggestions and ideas for improvement for future
  323.     releases. If you have any suggestions or problems to report please notify me
  324.     at my BBS listed below, or feel free to drop me a line at the address on
  325.     cover.I am distibuting this product FREE, all I ask is that you POST it on
  326.     as many BBS's as you call. If you have really found this program usefull
  327.     and wish to make a contribution fell free to do so. All contributions of
  328.     over $10 will include a SUBSCRIPTION to my BBS.
  329.  
  330.  
  331.  
  332.   USER FEEDBACK ......
  333.  
  334.     Once you have used this product for more than 30 days I would appreciate
  335.     your feedback on it. Just Cut at the dotted line fold on the dots and tape
  336.     shut. Address it and add a stamp and send it out. Thanks!
  337.  
  338.  
  339. ------------------------------------------------------------------------------
  340.  
  341. Your Name-_________________________________________ AGE-________________
  342.  
  343. Address-_________________________________ City/State-________________________
  344.  
  345. What uses have you found for RUNONDAY- ______________________________________
  346.  
  347. _____________________________________________________________________________
  348.  
  349. Comments/Suggestions-________________________________________________________
  350.  
  351. _____________________________________________________________________________
  352.  
  353. ...............................(FOLD HERE)...................................
  354.  
  355.  
  356.  
  357.  
  358.