2
Creating a new job
defines a new JobId
value as well.
Removing a job you no longer need is relatively simple. All you need is the JobId value, which
you can obtain by listing the jobs. The JobId value is unique, so it guarantees that you remove the
correct job. Once you have this number, you can use the DELETE verb to remove the job. For example,
if you want to remove job 3, you??™d type WMIC JOB Where JobID=3 DELETE and press Enter.
Combining the AT Utility with Batch Files
Before you can begin using the AT utility within a batch file, you need to know how to use it at
the command line. Creating a job with AT is relatively easy. Imagine that you want to defragment
your hard drive. You could create a defragmenter job that runs at 6 P.M. every Friday, immediately
after you leave work to go home for the weekend. You can create the job using the following
command line.
AT 6pm /Every:FRIDAY ???C:\WINDOWS\SYSTEM32\DEFRAG.EXE???
The same job using the SchTasks utility would require a longer command line, as shown here.
SchTasks /Create /RU SYSTEM /SC WEEKLY /D FRI /TN ???ST Defrag Hard
Drive??? /TR ???C:\WINDOWS\SYSTEM32\DEFRAG.EXE??? /ST 18:00:00
Of course, you can also create the same job using WMIC, as shown here.
Pages:
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540