Documentation forKiwi Syslog Server

Create a scheduled task to delete files — Legacy

This snippet is used for legacy 9.8.3 topics that link to a KSS NG topic of the same name.

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.

  1. From the Kiwi Syslog Service Manager, choose File > Setup.
  2. In the left pane of the Setup dialog, right-click Schedules and select Add new schedule.

  3. Replace the default name with a descriptive name.

  4. As the Task Type, select Clean-up.
  5. 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.
  6. On the Source tab:
    1. Under Source location, specify the folder that contains the files to be deleted.

      To delete files from subdirectories, select Include sub-folders.

    2. Under Source files, specify which files are deleted.

      The following example deletes ZIP files that are at least 7 years old.

  7. To delete empty folders in the source location, click the Clean-up Options tab and select Remove empty folders.
  8. 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.
  9. Click Apply to save your changes.