Dec 272017
 
Excellant utility to put in your autoexec.bat file. Runs any program on a given day of the week. Use for backups, disk de-fragments, message file clean-ups etc.
File RUNONDAY.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Excellant utility to put in your autoexec.bat file. Runs any program on a given day of the week. Use for backups, disk de-fragments, message file clean-ups etc.
File Name File Size Zip Size Zip Type
RUNONDAY.DOC 11171 4107 deflated
RUNONDAY.EXE 42744 29798 deflated

Download File RUNONDAY.ZIP Here

Contents of the RUNONDAY.DOC file











R U N O N D A Y 1 . 0






Compiled 10/24/89










By:

Keith Luken
35 Cedar Ave.
Leonardo, NJ 07737-1109

















PHANTASM BBS
201-291-2302 USR DUAL STANDARD | 201-291-4134 HAYES 9600 V.42


(C)1989 PHANTASM Software




Regular system maintainence is the key to a GOOD effective BBS. Too much
system maintainence is OVERKILL! With this in mind I set out to create
RUN ON DAY. While the daily event accomplishes many necessary functions
everytime it is run, some functions do not need to be run EVERY day. The
least important function to run every day is packing message bases! While
even on a NET MAIL system of some type your message bases will grow fast, it
is unlikely that the space it take up every day is that much to justify
packing ALL your message bases every day. If you don't pack them everyday
then you probably wind up doing it manually when you find the time. This
usually leads to the other extreme where your message bases are not being
packed often enough and you are wasting valuable disk space! Also even
PROPACK which packs bases very fast still can take several minutes to pack
your message bases. Also packing message bases usually involves high disk
intensive activity creating additional wear on your disk drive.

Sure all this is trivial during each event, but add up all that time saved
and the thousands of disk accesses you save by packing your message bases
only 2 out of 7 days, or 1 out of 7 days! RUN ON DAY does that, it allows
you to tailor your event to run certain programs on certain days only. And
if you are creative with your batch files you can use RUN ON DAY several
different times in your event to spread different programs out over the
entire week! RUN ON DAY is easy to use and requires no special installation.
While RUN ON DAY was written with packing message bases in mind it can be
used for just about anything that you want to trigger on only specific days!

RUNONDAY looks in the DOS enviornment for up to 7 different variables that
you define. The variables can be anything you want since you will tell
RUNONDAY what variables to look for when you start it up on command line.
I recommend using variables that will be self explanatory when viewed as not
to confuse you at a later date. When you define the variables you MUST and a
number from 1 to 7 on the end! ONLY ADD THE NUMBER WHEN YOU SET VARIABLES!
ex. SET DAYTOGETMAIL1=MONDAY
SET DAYTOGETMAIL2=WEDNESDAY

When you start RUNONDAY you follow it on the command line with the VARIABLE
you set WITHOUT the trailing number!
ex. RUNONDAY DAYTOGETMAIL

RUNONDAY will automatically scan for your variable followed by the numbers
1 to 7. You may use any number of variables you wish up to 7. If you only
choose 1 then it will only look for 1.
When it finds the variables it compares them to the present day to
determine if today's day is one of those in the variables. If it is RUNONDAY
creates a one line text file called "DOITKNOW.TXT". By using a statement-
IF EXIST DOITKNOW.TXT GOTO .... statement in your batch file you can allow
the batch file to branch only on specified days. ** IT is IMPORTANT that as
soon as your BATCH file branches the first thing it should do is ERASE
DOITKNOW.TXT to prevent the next check for this file to be triggered by
accident!!!! Now RUNONDAY can have many different uses. It is not just for
BBS's. You could have it run in an AUTOEXEC.BAT so that on certain days when
you turn on your computer it might perform file maintainence. The uses are
limitless.





HOW TO USE....

RUN ON DAY is run without any configuration files! To properly operate
you need only use the "SET" statement of DOS to load the variables.


SET PACKDAY1=SUNDAY
SET PACKDAY2=Wednesday
SET OptimizeDay1=MonDay

Notice I used one in UPPER CASE and the others in mixed case. RUNONDAY is
NOT case sensitive. The day however must be spelled out COMPLETLEY and
correctly for RUNONDAY to work. If you wish to only have less than 7 days as
a trigger then you can use any variable suffix 1-7 and don't enter
anything for the others. RUNONDAY will look for ALL 7 variables, but it WILL
NOT error if all are not found. It will just use the ones it found.
To Verify your choices and the current day RUNONDAY first displays
your varaibles as it read them from the DOS enviornment then it shows
you what today's date is for comparison. When complete RUNONDAY displays a
message informing you if it found a match for today or not. Sounds simple
enough right... right. Now for some examples of how it can be set up to do
different things........


** NOTE - Unlike RUN ON DAY's predecessors MAILSAVE and SAVEPACK you can
run RUNONDAY over and over without resetting variables.
By passing the variable name to RUNONDAY from the command line you
can use it many times in same batch file as long as all your
variables are different. The last example shows how you can SET up
all the variables from your autoexec and then have them called
whenever the batch file runs. This allows much greater
flexibility.





EXAMPLES.........


Example 1 - This bat file is called TRANSFER.BAT on my system and is run in
my EVENT daily. It performs a RelayNet(tm) mail run and verifies
that it completed a successful mail import, then it runs
RUNONDAY to compare the day and if it matches it branches to do
PROPACK of my message bases.

CD c:\PCB\RELAY
c:
copy lasttime.txt lastmail.txt
erase lasttime.txt
CALL EXPORT
CD H:\COMM\RELAY
H:
QMODEM /S=Q4RLY.SCR
c:
cd c:\pcb\relay
CALL IMPORT
c:
if exist c:\pcb\relay\lasttime.txt goto DayCheck
goto end
:DayCheck
SET PACKDAY1=SUNDAY
SET PACKDAY2=THURSDAY
RUNONDAY PACKDAY (*NOTE- DO NOT ADD THE VARIABLE NUMBER HERE)
if exist DOITKNOW.TXT goto PACK
goto end
:PACK
erase DOITKNOW.TXT
cd c:\pcb\prod
call PACKALL
cd c:\pcb\relay
:END
cls



Example 2 - This is an EVENT batch file that uses SAVEPACK several times to
spread certain programs out over the entire week. First it uses
it to see if this is the day to do a mail run. Second it checks
to see if this is ONE day a week to RE-COLOR the directories.
Notice that when running RUNONDAY more than once you no longer
have to worry about conflicting variables. By using different
variable names you eliminate chance of conflict.

cd l:\pcb\doors\tw1000
twmaint /m
cd l:\pcb
SET MAILDAY1=TUESDAY
SET MAILDAY2=FRIDAY
SET MAILDAY3=SUNDAY
RUNONDAY MAILDAY
if exist DOITKNOW.TXT goto MailRun
goto Ratio
:MailRun
erase DOITKNOW.TXT
CALL TRANSFER
:Ratio
cd l:\pcb
pcbsm /ADJUST;FILERATIO
SET UserRatioDay1=TUESDAY
SET UserRatioDay2=SUNDAY
RUNONDAY UserRatioDay
if exist DOITKNOW.TXT goto Directories
goto End
:Directories
erase DOITKNOW.TXT
cd l:\pcb
WGM-DMS l:\PCB\PCBOARD.DAT
:End

EXAMPLE 3 - This is a sample AUTOEXEC.BAT that would run twice a week to
defragment a hard disk. If you do little file updating then maybe
once a week would be enough to defragment your hard disk.

Prompt $P$G
path= C:\dos;c:\util
Share
Verify On
C:\dos\Fastopen C:=50,D:=25
SET OptimizeDay1=Monday
SET OptimizeDay2=Thursday
RUNONDAY OptimizeDay
if exist DOITKNOW.TXT goto Optimize
goto End
:Optimize
erase DOITKNOW.TXT
VOPT C:
VOPT D:
:End
PC-CACHE /Sizext=512K /IA /IB /Max=4

cls


EXAMPLE 4 - This is a total setup that shows how you can set variables in the
AUTOEXEC for all possible batch runs.
(AUTOEXEC.BAT)

Prompt $P$G
path= C:\dos;c:\util
Share
Verify On
C:\dos\Fastopen C:=50,D:=25
SET MAILDAY1=TUESDAY
SET MAILDAY2=THURSDAY
SET MAILDAY3=SUNDAY
SET PACKDAY1=TUESDAY
SET USERRATIODAY1=Wednesday
SET COLORDIRS1=FRIDAY
SET OptimizeDay1=Monday
SET OptimizeDay2=Friday
RUNONDAY OptimizeDay
if exist DOITKNOW.TXT goto Optimize
goto End
:Optimize
erase DOITKNOW.TXT
VOPT C:
VOPT D:
:End
PC-CACHE /Sizext=512K /IA /IB /Max=4
cls

(EVENT.SYS) ** PCBoard Daily Event Batch File **

cd l:\pcb\doors\tw1000
twmaint /m
cd l:\pcb
RUNONDAY MAILDAY
if exist DOITKNOW.TXT goto MailRun
goto Ratio
:MailRun
erase DOITKNOW.TXT
CALL TRANSFER
RUNONDAY Packday
if exist DOITKNOW.TXT goto PACK
goto Ratio
:PACK
erase DOITKNOW.TXT
c:\pcb\prod\PACKALL
:Ratio
cd l:\pcb
RUNONDAY UserRatioDay
if exist DOITKNOW.TXT goto Users
goto Dirs
:Users
erase DOITKNOW.TXT
pcbsm /ADJUST;FILERATIO
:Dirs
RUNONDAY ColorDirs
if exist DOITKNOW.TXT goto Directories
goto End
:Directories
erase DOITKNOW.TXT
cd l:\pcb
WGM-DMS l:\PCB\PCBOARD.DAT
:End

WARRANTY........

As usually this product is distributed AS IS with no WARRANTY as to
performance. You assume FULL responsibility for the integrity of this
product. The author assumes NO responsibility for any damages done due to
the use of this product.


SUGGESTIONS AND UPDATES........

I am always open to suggestions and ideas for improvement for future
releases. If you have any suggestions or problems to report please notify me
at my BBS listed below, or feel free to drop me a line at the address on
cover.I am distibuting this product FREE, all I ask is that you POST it on
as many BBS's as you call. If you have really found this program usefull
and wish to make a contribution fell free to do so. All contributions of
over $10 will include a SUBSCRIPTION to my BBS.



USER FEEDBACK ......

Once you have used this product for more than 30 days I would appreciate
your feedback on it. Just Cut at the dotted line fold on the dots and tape
shut. Address it and add a stamp and send it out. Thanks!


------------------------------------------------------------------------------

Your Name-_________________________________________ AGE-________________

Address-_________________________________ City/State-________________________

What uses have you found for RUNONDAY- ______________________________________

_____________________________________________________________________________

Comments/Suggestions-________________________________________________________

_____________________________________________________________________________

...............................(FOLD HERE)...................................






 December 27, 2017  Add comments

Leave a Reply