Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule a task

Status
Not open for further replies.

cparralesl

Programmer
Jan 27, 2002
118
NI
Hi there guys,

I need your help with this.

I need to run a process that Zip a file from a network drive (M:\) to another network drive (N:\).

This process have to be run at specific time, 12:00am for example.

Can somebody tell me how to built a script file that help me with this?

Thank's inadvance.

Cesar Humberto Parrales
Application Support
Home : 00505-289-2484
Mobil: 00505-8856-016
 
I have found the best way to do this is to Shell out an "at" command. The COM interface for this procedure is limited unless you download a more robust dll for scheduling tasks.

Example:

dim WshShell
set WshShell = CreateObject("Wscript.Shell")
WshShell.run "at \\computername 12:00 c:\winnt\notepad.exe"

This will launch a dos window and run the command. The COM object will allow you to do the same thing (without the dos window), but you have to do more coding.

Dana Hallenbeck
 
Ok. Thanks Cesar Humberto Parrales
Application Support
Home : 00505-289-2484
Mobil: 00505-8856-016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top