This is a very common use for Fdate. I use it to load an alarm-clock TSR
(Terminate and Stay Resident, "memory resident", program) that beeps at me
(at different times on different days of the week) to remind me that it is
time to attend a meeting that is regularly scheduled for that day of the
week.
Note that stuff for a given day of the week will be executed every time you
boot up on that day of the week. If you want stuff (e.g. a backup job) to
be run only once (the first time you boot up) on a given day of the week,
then:
- (1) copy the code from DO-ONCE (the previous example) into your
AUTOEXEC.BAT file, then
- (2) copy this code into the body of the DO-ONCE code that you copied into
AUTOEXEC.BAT in the last step. If you do that, then this code will be
run only once per day, even if you boot up multiple times per day.
Remember that if you are executing other batch files from a batch file,
you should invoke them with a CALL statement:
CALL batchfilename parm1 parm2 ...
so control will return to the calling batch file when execution of the
called batch file is complete.
Note that the string comparison is case sensitive.