1.

Solve : Batch file that creates a schedule job?

Answer»

I created a batch file that deletes the CONTENTS of a folder but I need a batch file that creates a schedule job for this to run once a day without the user on the pc having to do anything. Can anyone help me. I looked at the forum and saw the AT command but I don't this this will help me because I can't have the user do anything.

Thanks in advance.What version of Windows? If 2000 / XP / 2003 / VISTA, you can look at the command
SCHTASKSQuote

SCHTASKS /parameter [arguments]

Description:
Enables an administrator to create, delete, query, change, run and
end scheduled tasks on a local or remote system. Replaces AT.exe.

Parameter List:
/Create Creates a new scheduled task.

/Delete Deletes the scheduled task(s).

/Query Displays all scheduled tasks.

/Change Changes the properties of scheduled task.

/Run Runs the scheduled task IMMEDIATELY.

/End Stops the currently running scheduled task.

/? Displays this help/usage.

Examples:
SCHTASKS
SCHTASKS /?
SCHTASKS /Run /?
SCHTASKS /End /?
SCHTASKS /Create /?
SCHTASKS /Delete /?
SCHTASKS /Query /?
SCHTASKS /Change /?
This looks really good and probably just what I need.

Just for an FYI
I work in the IT dept at a home OFFICE and we have computers at different sites and they are locked down with deep freeze and people in these offices cannot delete files and our help desk guy was having to log in and delete files for people and this was taking a lot of time. I suggested that we write something that would delete the contents of a folder automatically and he thought it was a great idea but told me to do it. I am NOT a programmer but I have been trying to play with this. I was able to write the batch to delete the folder contents but now he wants me to make a batch that creates the folder, then creates the schedule job. I didn't know what I was getting myself into when I made the sugestion.

Thanks for the help but I will probably need more.


Discussion

No Comment Found