Jobs
Jobs serve as periodically running helper programs for the synchronization and processing of data.
Trigger
Jobs can be started automatically with the help of a so-called
trigger. The trigger creates a schedule so that jobs can be started as needed (hourly, daily,
weekly or monthly, ...). The setting can be configured down to the day, hour and
minute.
If needed, jobs can also be started manually at any time.
Furthermore, jobs can have an active or inactive status. When active, jobs are started according to the configured trigger. If
they are inactive, they can only be started manually. The status
can be changed at any time.
A trigger represents a schedule for the execution of a job. It defines when, how often, and at what intervals the job is executed.
-
Schedule type
This is where the trigger is selected: -
Minute trigger
If this parameter is selected, the job is restarted every minute -
Hourly trigger
With this parameter, the job is restarted every hour -
Daily trigger
Allows selection of the exact time (hours and minutes) -
Weekly trigger
Allows selection of the weekday and time -
Monthly trigger
Selection of the day and time on which the trigger should start -
Simple trigger
Possible settings are number of repetitions, start and end date, and minutes in interval. -
Cron trigger
This is a special type of trigger. The cron expression can consist of 6 or 7 characters separated by spaces. These characters can represent all allowed values, and can also include some special characters (e.g. , - * / ). The character * stands, for example, for all possible values (wildcard). The meaning of the other special characters can be found under the link given below.
In this way a point in time (hour, minutes, date, day, month, year, etc.) can be determined for the trigger. The cron expression can, for example, look like this: 0 0 12 * * ?, which means that the trigger should fire daily at 12:00 (noon). - Legend (fields in correct order):
Field name
Allowed values
Allowed special characters
Seconds
0-59
, - * /
Minutes
0-59
, - * /
Hours
0-23
, - * /
Day-of-month
1-31
, - * ? / L W C
Month
1-12 or JAN-DEC
, - * /
Day-of-Week
1-7 or SUN-SAT
, - * ? / L C #
Year (Optional)
empty, 1970-2099
, - * /
-
Examples:
Expression
Meaning
0 0 12 * * ?
Starts daily at 12:00
0 15 10 ? * *
Starts daily at 10:15
0 15 10 * * ?
Starts daily at 10:15
0 15 10 * * ? *
Starts daily at 10:15
0 15 10 * * ? 2005
Starts daily at 10:15 during the year 2005
0 * 14 * * ?
Starts every minute daily beginning at 14:00 and ending at 14:59
0 0/5 14 * * ?
Starts every 5 minutes daily beginning at 14:00 and ending at 14:55
0 0/5 14,18 * * ?
Starts every 5 minutes daily beginning at 14:00 and ending at 14:55, AND starts every 5 minutes beginning at 18:00 and ending at 18:55
0 0-5 14 * * ?
Starts every minute daily beginning at 14:00 and ending at 14:05
0 10,44 14 ? 3 WED
Starts at 14:10 and at 14:44 every Wednesday in the month of March
0 15 10 ? * MON-FRI
Starts at 10:15 every Monday, Tuesday, Wednesday, Thursday and Friday
0 15 10 15 * ?
Starts at 10:15 on the 15th of every month
0 15 10 L * ?
Starts at 10:15 on the last day of every month
0 15 10 ? * 6L
Starts at 10:15 on the last Friday of every month
0 15 10 ? * 6L 2002-2005
Starts at 10:15 on the last Friday of every month in the years 2002, 2003, 2004 and 2005
0 15 10 ? * 6#3
Starts at 10:15 on the third Friday of every month
Further information on cron triggers can be found at: http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html
-
Delete
Activating the check box deletes the existing trigger (activate the check box by clicking it, then click "Save" or "Save & Close") -
New trigger
A new trigger can be created here. The selection works the same way as for the schedule type -
Save, Save & Close
Clicking Save applies the change, and the form can still be edited further. Clicking "Save & Close" saves the job and returns to the job overview
Sending mail
If needed, jobs can also be configured to send mail. The mail notification contains only the job log and is sent to a defined person if a log entry with a specified level exists.
-
Enable mail notification
If this check box is checked, mail notification is enabled -
Log level
An e-mail is sent if a log entry with the specified level exists. Prioritization of error messages - Fatal – only error messages are output
- Error – all error messages
- Warn
- Info
- Debug – outputs the most messages (e.g. "loading record with number xy...")
- All – all messages are output
-
Search criterion
If one of the log entries contains one of the specified words, an e-mail is sent. -
Send only a link to the logs
If this parameter is checked, only a link to the log entries is sent. Otherwise all log details are sent. -
Server address
Enter the server address here. E.g. http://myserver.com/webdesk -
Persons to be notified
Enter a valid e-mail address for notifications that the job has run, or that errors have occurred. - Add > Add new e-mail addresses
- Delete > Delete existing e-mail addresses
Monitoring jobs
For monitoring jobs, it is extremely important that the implementing job classes log appropriately. This logging information is then usually written to the Webdesk database logs and can therefore be evaluated via the Monitoring > Log entries view.
Monitoring of jobs is enabled by the "Active jobs" view, where all active jobs can be seen at a glance. Furthermore, with appropriate parameterization, the progress of the job can be traced with the help of log entries. Based on the configured log level (a defined status during the job's progress, such as error, warning, ...), it becomes apparent whether a job ran without problems, or whether certain problems occurred.
Recommended log settings
In general, the log level of jobs in the
log settings (Full System Administrator: System --> Log settings) should
be set to at least INFO. This ensures that all
log information that the programmer has qualified as INFO or higher
is written to the database log. For example, during batch processing,
this should typically log the number of processed records. In any case, errors (exceptions) are logged in every case!
If errors occur in the job, it can be useful to increase the logging level for
jobs to DEBUG!


Keine Kommentare vorhanden.