Built-in Jobs: Difference between revisions

From Obsidian Scheduler
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
Obsidian comes bundled with free jobs for common tasks. These are provided in addition to [[Scripting Jobs]] to reduce implementation and testing time for common job functions.
Obsidian comes bundled with free jobs for common tasks. These are provided in addition to [[Scripting Jobs]] to reduce implementation and testing time for common job functions.


= Obsidian Maintenance Jobs =
= File Processing Jobs =
 
These jobs are provided to provide common basic file operations, such as file cleanup (deletion) and archiving. These jobs can be used to reduce the amount of code your organization needs to write.
 
== File Cleanup Job ==
 
'''Job Class:''' <code>com.carfey.ops.job.maint.FileCleanupJob</code>
 
This job deletes files in specified paths based on one or more file masks (using regular expressions).
 
It supports the following configuration options:
 
* '''Abort on Deletion Failure (Boolean)''' - If deletion fails, should we fail the job?
* '''Directory (1 or more Strings)''' - A directory to scan for files. If recursive processing is enabled, child directories are also scanned.
* '''File Mask (1 or more Strings)''' - A regular expression that files must match to be deleted. This is based on <code>java.util.regex.Pattern</code>. To match all files, remove all configured values or use ".*" without quotes.
* '''File Size Minimum (String)''' - The minimum size in bytes a file must be to be deleted. File sizes can be specified in bytes, kilobytes, megabytes or gigabytes (e.g. 10b, 100kb, 20mb, 2gb).
* '''File Size Maximum (String)''' - The maximum size in bytes a file must be to be deleted. File sizes can be specified in bytes, kilobytes, megabytes or gigabytes (e.g. 10b, 100kb, 20mb, 2gb).
* '''Minimum Time Since Modified (String)''' - The minimum age of a file to be deleted, based on the modified time. This can be specified in seconds, minutes, hours and days (e.g. 10s, 5m, 24h, 2d).
* '''Recursive (Boolean)''' - Whether files in subdirectories of the configured directories should be checked for matching files.
 
= Maintenance Jobs =


These jobs are provided to help maintain the Obsidian installation.
These jobs are provided to help maintain the Obsidian installation.

Revision as of 00:14, 22 April 2013

Obsidian comes bundled with free jobs for common tasks. These are provided in addition to Scripting Jobs to reduce implementation and testing time for common job functions.

File Processing Jobs

These jobs are provided to provide common basic file operations, such as file cleanup (deletion) and archiving. These jobs can be used to reduce the amount of code your organization needs to write.

File Cleanup Job

Job Class: com.carfey.ops.job.maint.FileCleanupJob

This job deletes files in specified paths based on one or more file masks (using regular expressions).

It supports the following configuration options:

  • Abort on Deletion Failure (Boolean) - If deletion fails, should we fail the job?
  • Directory (1 or more Strings) - A directory to scan for files. If recursive processing is enabled, child directories are also scanned.
  • File Mask (1 or more Strings) - A regular expression that files must match to be deleted. This is based on java.util.regex.Pattern. To match all files, remove all configured values or use ".*" without quotes.
  • File Size Minimum (String) - The minimum size in bytes a file must be to be deleted. File sizes can be specified in bytes, kilobytes, megabytes or gigabytes (e.g. 10b, 100kb, 20mb, 2gb).
  • File Size Maximum (String) - The maximum size in bytes a file must be to be deleted. File sizes can be specified in bytes, kilobytes, megabytes or gigabytes (e.g. 10b, 100kb, 20mb, 2gb).
  • Minimum Time Since Modified (String) - The minimum age of a file to be deleted, based on the modified time. This can be specified in seconds, minutes, hours and days (e.g. 10s, 5m, 24h, 2d).
  • Recursive (Boolean) - Whether files in subdirectories of the configured directories should be checked for matching files.

Maintenance Jobs

These jobs are provided to help maintain the Obsidian installation.

Job History Cleanup Job

Job Class: com.carfey.ops.job.maint.JobHistoryCleanupJob

This job will delete job history and related records beyond a configurable age in days. This is useful for keeping the database compact and clearing out old, unneeded data.

The value for maxAgeDays corresponds to the maximum age for records to retain. By default it is set to 365, but you may configure it to any desired value.

Note: We recommend high volume users schedule the job weekly or less frequently and to schedule it for a non-peak time.

Log Cleanup Job

Job Class: com.carfey.ops.job.maint.LogCleanupJob

This job will delete log database records beyond a configurable age in days. This is useful for keeping the database compact and clearing out old, unneeded data.

The value for maxAgeDays corresponds to the maximum age for records to retain. By default it is set to 365, but you may configure it to any desired value.

The value for level corresponds to the logging level of events to delete. You may specify multiple values, and the "ALL" option will result in all records matching the age setting being deleted. Valid levels to configure are: FATAL, ERROR, WARNING, INFO, DEBUG, and TRACE.

It is common to only delete lower severity level events, such as INFO, DEBUG, and TRACE, but retain higher severity messages.

Note: We recommend high volume users schedule the job weekly or less frequently and to schedule it for a non-peak time.