Solved

Name A Scheduled Task From The Command Line or Batch File

Posted on 2011-03-04
5
580 Views
Last Modified: 2012-05-11
I have a batch file that I run on several servers to schedule a task:

at 12:00 /Every:F C:\clean_n_defrag.bat

The name of the task ends up being At1 (or At2, At3, etc depending on the names of existing jobs)

Using the above AT command, is there a way for me to establish the name of the task as it is created?

If not, is there something I can run next that will rename and existing task? (In this case, renaming At1 to something like "Weekly Cleanup and Defrag)

Thanks
0
Comment
Question by:pbhcpa
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
pbhcpa earned 0 total points
ID: 35039202
Nevermind. I found that it is stored as C:\Windows\Tasks\At1.job

I just had to use REN in the batch file.
0
 
LVL 33

Expert Comment

by:paulmacd
ID: 35039212
There doesn't appear to be:
http://support.microsoft.com/kb/313565
0
 

Author Comment

by:pbhcpa
ID: 35039265
Yeah I read that article. Ended up just using this:

at 12:00 /Every:F C:\clean_n_defrag.bat
ren c:\windows\tasks\At1.job "Cleanup and Defrag.job"

This gave me the results I needed. Thanks for posting the article link though. It will help someone down the road.
0
 
LVL 33

Expert Comment

by:paulmacd
ID: 35039278
Are you sure that will work?  If you rename the job, will Windows be able to find it?
0
 

Author Comment

by:pbhcpa
ID: 35039294
Yes. Done it on 5 servers without issue.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now