HI,<br>
I'm wondering if its possible to run a command by scheduling an event to run hourly, daily, weekly,etc. If so, an example of this would be appreciated
In NT use the "at" command:<br>
<br>
AT [\\computername] [ [id] [/DELETE] ¦ /DELETE [/YES]]<br>
AT [\\computername] time [/INTERACTIVE]<br>
[ /EVERY:date[,...] ¦ /NEXT:date[,...]] "command"<br>
<br>
"\\computername" Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.<br>
<br>
"id" Is an identification number assigned to a scheduled command.<br>
"/delete" Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.<br>
<br>
"/yes" Used with cancel all jobs command when no further confirmation is desired.<br>
<br>
"time" Specifies the time when command is to run.<br>
<br>
"/interactive" Allows the job to interact with the desktop of the user who is logged on at the time the job runs.<br>
<br>
"/every:date[,...]" Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.<br>
<br>
"/next:date[,...]" Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed.<br>
<br>
"command" Is the Windows NT command, or batch program to be run.<br>
MIke...Is this for a batch file to be run on NT? WHat you are saying is write a batch file then execute it from the VB app?<br>
<br>
Although the using a timer control is extra overhead you could use it to check the time and execute if the time is right. Or have your users use the system agent on win98 to execute a set time.
The AT command is a native NT command and will run either a batch file or a standard program.<br>
<br>
I'm suggesting that you call the AT command from VB.<br>
<br>
I wouldn't reccomend that you rely on your users because - despite their obvious and many charms - users are people too and have been known to forget things.<br>
<br>
Mike<br>
---<br>
Mike_Lacey@Cargill.Com<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.