Overview
The Field Object Watcher Job monitors scheduled or delayed actions in the system and executes them when their trigger date arrives. These actions are pre-recorded in the EventNotification table by the system based on filters defined in module actions.
For example, the job can automatically:
Send reminders based on a deadline in a module field.
Perform updates or notifications when certain conditions are met.
How it works
The Field Object Watcher works as below:
When an action is scheduled with a future trigger date (e.g., 2 days before a deadline), the system writes a record to the EventNotification table.
The Field Object Watcher job periodically scans this table.
Items with due dates equal to or earlier than the current job execution are triggered, while items before the specified cutOffDate are ignored.
Example:
An Order module has a Deadline field (date type).
A manager wants a reminder 2 days before the deadline.
An action is created with a filter on the Deadline field: 2 days before the deadline.
If an order is created with a deadline of 27/03/2011 and today is 24/03/2011, the action is not fired immediately. Instead, a record is added to EventNotification with a trigger date of 25/03/2011.
When the Field Object Watcher job runs on 25/03/2011 or later, it finds the record and executes the action.
Parameters
The table below provides an overview of parameters supported for the Field Object Watcher
Parameter | Description |
---|---|
| Name of the scheduler job. |
| Class that performs the job: |
| Only items with dates later than this will be inspected. Previous items are ignored. |
| Comma-separated list of times (HH:MM) when the job should run. |
| Interval in seconds for periodic execution (optional if |
Note:
The job triggers actions only for items with a trigger date later than cutOffDate.
The job reads the EventNotification table, not module fields directly.
Example Configuration
The below is an example of the Field Object Watcher
joblist=fieldObjWatcher
job.fieldObjWatcher.type=enCode.app.common.scheduler.jobs.FieldObjectWatcherJob
job.fieldObjWatcher.param.cutOffDate=01-01-2025
job.fieldObjWatcher.startimes=09:00,17:00
Explanation:
Executes actions only for items dated after January 1, 2025.
Runs daily at 09:00 and 17:00.
Items with trigger dates before 01-01-2025 are ignored.