Create a scheduled task to delete files
A clean-up task deletes files that match the specified criteria (including age, size, and file type). For example, you can create a clean-up task to remove archived log files after they have been retained for the required period. You can schedule the task to run at regular intervals.
You can also create a scheduled task to archive log files not needed for troubleshooting. For an example of creating archive and cleanup tasks, see Create schedules to automate log archival and retention in the Kiwi Syslog Server Getting Started Guide.
- From the Kiwi Syslog Service Manager, choose File > Setup.
In the left pane of the Setup dialog, right-click Schedules and select Add new schedule.
Replace the default name with a descriptive name.
- As the Task Type, select Clean-up.
As the Task Trigger, specify when you want the archive task to run:
- To schedule the task, select On a schedule. Then specify the start date, frequency, end date, and any exceptions on the Schedule tab.
- To run the task each time you start or stop the Kiwi Syslog Server application or service, select On app/service startup or On app/service shutdown.
- On the Source tab:
Under Source location, specify the folder that contains the files to be deleted.
To delete files from subdirectories, select Include sub-folders.
Under Source files, specify which files are deleted.
The following example deletes ZIP files that are at least 7 years old.
- To delete empty folders in the source location, click the Clean-up Options tab and select Remove empty folders.
To email or save the report generated each time the clean-up task runs, select one or more options on the Clean-up Notification tab.
- To email the report to multiple recipients, separate the list of email addresses by commas or semicolons.
- If you save the report to a file, insert date and time variables in the file name to ensure that it is unique. If the file name is not unique, Kiwi Syslog Server overwrites the existing file when it creates a new file.
- Click Apply to save your changes.