Solved

Name A Scheduled Task From The Command Line or Batch File

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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