Solved

Name A Scheduled Task From The Command Line or Batch File

Posted on 2011-03-04
5
583 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 34

Expert Comment

by:Paul MacDonald
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 34

Expert Comment

by:Paul MacDonald
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

22 Experts available now in Live!

Get 1:1 Help Now