Solved

Name A Scheduled Task From The Command Line or Batch File

Posted on 2011-03-04
5
585 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Suggested Solutions

Title # Comments Views Activity
how to make a specific windows 2003 GPO setting visible in a 2008 network 8 62
move command 5 67
Coding yesterday's date 3 46
How to remove unwanted words? 34 64
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…

740 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