×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Scheduling a task

Scheduling a task

Scheduling a task

(OP)
HI,
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

RE: Scheduling a task

In NT use the "at" command:

AT [\\computername] [ [id] [/DELETE] ¦ /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] ¦ /NEXT:date[,...]] "command"

"\\computername" Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.

"id" Is an identification number assigned to a scheduled command.
"/delete" Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.

"/yes" Used with cancel all jobs command when no further confirmation is desired.

"time" Specifies the time when command is to run.

"/interactive" Allows the job to interact with the desktop of the user who is logged on at the time the job runs.

"/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.

"/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.

"command" Is the Windows NT command, or batch program to be run.

RE: Scheduling a task

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?

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.

RE: Scheduling a task

The AT command is a native NT command and will run either a batch file or a standard program.

I'm suggesting that you call the AT command from VB.

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.

Mike
---
Mike_Lacey@Cargill.Com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close