Re: Windows "Scheduled Task Wizard..."



Thanks for the feedback. The script example I gave you is
a batch file. In its simplest form a batch file consists of a
collection of commands such as copy, delete, move, ask
the user for some input etc. Since Windows 2000, batch
files have become a lot more intelligent. They can do
simple mathematical and string operations. Your batch
file contains an example. The command

echo %date:~7,2%

will take the current date (denoted by %date%) but
will not write the whole date string to the screen
(which would be Wed 09/26/2007) but only start
at position 7, taking two characters from there. Note
that counting starts at 0.

To get basic help, type help at the command prompt.
To get help for each command, type

xcopy /?

at the command prompt (for example). The advanced
commands are
set /?
and
for /?

Save them until later.


"SmithSmith001" <SmithSmith001@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4194F201-50AF-4A18-BACA-941D0D9F38ED@xxxxxxxxxxxxxxxx
Pegasus,
You are great. I have implemented the code as per your suggestion. It
works
for me.
By the way... what is this script is called? Is it simple DOS commands?
Where I can learn more about this scripting language? Any link to this
resource will be of great help.
Thank you,
Smith


"Pegasus (MVP)" wrote:

Do this:
- Click Start / Run / notepad.exe c:\Windows\MyTask.bat{Enter}
- Type these lines:
@echo off
echo The day of the month is %date:~7,2%
if %date:~7,2% LSS 25 goto :eof
c:\Tools\MonthLoad.exe
- Save and close the file.
- Test it.
- Invoke it with the Task Scheduler.

The code is dependent on the country you live in. The second
line (which is purely for debugging purposes) is supposed to
show you the day number. If it does not, vary the number "7"
until it does, both in lines 2 and in line 3.


"SmithSmith001" <SmithSmith001@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:890788AB-D43C-45D0-BEA6-9B2E200FCA27@xxxxxxxxxxxxxxxx
Thank you for the solution and suggestion.
How to write the batch commands.
Here is my pseudo code for MonthlyLoad.bat
------------------------------
get day of the month
if day of the month > 25
MonthLoad.exe
-------------------------------

Do not know how to write batch commands for the above.
Any advice is appreciated.
Should I use WSH. or will the vb script will do?
Thank you,
Smith





"SmithSmith001" wrote:

Windows 2000 Professional.

How to schedule a job which runs from 25th of the month to the end of
the
month every day once at 7.30 am?
I am not finding the way to schedule one job to meet the above
requirement.
Alternatively, I am scheduling 7 jobs to run 25th to the end of the
month
(31st).
Any suggestion?
Thank you,
Smith






.



Relevant Pages

  • Re: Another Scheduled Task failure in Windows 2008 question
    ... I made the following two modifications to the script on the new server: ... I had another script I was trying to run on this server that would not run on its schedule until I changed this option to use Robocopy's /LOG option. ... Because of this I changed all of the> commands to /LOG and all of the>> commands to /LOG+. ... Logged into the fileserver as this account and double-clicking on the script made it run fine. ...
    (microsoft.public.windows.server.general)
  • Re: Stop windows service copy data and then start service
    ... I have never succeeded in stopping a service that the commands "net ... I did run the script it works fine copying data but actually i believe its ... I created this as a batch file and did schedule it ...
    (microsoft.public.windows.server.scripting)
  • Re: Another Scheduled Task failure in Windows 2008 question
    ... The script ran and completed, there were just some errors in the copy due to denied access. ... I had another script I was trying to run on this server that would not run on its schedule until I changed this option to use Robocopy's /LOG option. ... Because of this I changed all of the> commands to /LOG and all of the>> commands to /LOG+. ... Logged into the fileserver as this account and double-clicking on the script made it run fine. ...
    (microsoft.public.windows.server.general)
  • RE: I need Coupling Facility Structure information.
    ... You might have to use REXX to invoke for each structure. ... I expect the non-free MXI G2 is even more capable. ... a dataset via a batch process. ... output from commands in the past. ...
    (bit.listserv.ibm-main)
  • Re: Printing port question
    ... output commands, or will these commands revert to default settings after the ... You don't need to start/stop it by batch files or add other stuff to your own applications. ... Printfil can capture the DOS LPTx output or directly the ascii file created by your own application ...
    (microsoft.public.win2000.general)