Lesson 5: Deleting Temporary Files Once a Week

In this lesson we shall teach nnCron to perform some routine work: each Monday night it will remove from Windows temporary directory (c:\windows\temp) all files that more than 2 days old.

First of all, we right-click on the nnCron icon in system tray and select New Task in the menu.

In Task name field we type, for instance, "Temp_Cleanup".

On Time and Options tab we specify the schedule: weekly, 00:30, every Monday.

On the Action tab we select Purge directory from the drop-down menu, and specify what directory should be purged and the age of files, i.e. how old the files should be to be deleted.

As usual, we check the source text of our task on the Advanced tab.

>> To the next lesson