Each job consists of a header section, one or more "steps" and the classes and/or stored procedures the job is supposed to invoke at specific times or intervals.
|Name||can be anything, although for clarity we try to use the same name for the same job in each instance.|
|Description||additional information for administrators. Usually empty and does not affect the job in any way.|
|Time pattern|| uses the format "F MM dd HH mm", which means: "day_of_week; month; day_of_month; hours; minutes". It is imperative that any unused values are replaced with the "*" symbol, and that the pattern is exactly 13 characters long (unless left empty).
|Time interval||interval, in seconds. How often the job should be executed.|
|Notification||if something goes wrong during job execution, the stack trace is sent as an "execution errors" e-mail to this address. It's not sent instantly, execution errors are usually only sent once a day.|
|Enabled||cross this check box to make the job active. Inactive jobs are never executed regardless of time interval / pattern settings. They can be executed manually with the "start selected" list view command.|
|Step number|| number that determines the order in which the steps are executed. Most jobs only have one step, in which case "1" is a natural value. This is not always the case. For example, if the job has 3 steps, they should be numbered 1, 2 and 3 to ensure correct execution order.
|Type|| determines what is invoked when the job is executed. This could be:
|Target name|| name of the stored procedure or the full package name of the Java class to be invoked.
|Parameter||the contents of this field are passed as a parameter to the Java class or stored procedure upon invocation. The use of this field is inherently job-specific so in most cases it should be left empty.|
From the field structure we can already see that there are two alternate ways of "timing" a job: time patterns and intervals. One of the time fields is always left empty.
|One must be careful when using day_of_week though; for example: "7 ** 12 02 10" means: execute every sunday, 12th day of the month, at 02:10. What if the 12th day is not sunday? Nothing happens that month.|
Once a time pattern has been evaluated "true" (and the job is executed), it has to evaluate "false" at least once before the job can be executed again. For example, a time pattern like "* ** 01 ** **" (aka. execute on first day of each month) is perfectly valid, and does not result in repeated executions, even though it evaluates "true" repeatedly (the main timer process is executed every 5 seconds after all). The pattern would not evaluate as false until we get to the second day of that month. Jobs are executed as soon as the pattern matches, which in this case would be at 00:00. However, for safety reasons hour/minute settings should always be used; if PlanMill instance where the job is running is reloaded, locks are opened, which might otherwise result in repeated execution.
There is a subtle mechanism which "shifts" execution time, in some cases by up to an hour; parameter "Administration.Jobs.Settings.Shift" tells the system to move execution time forward by X minutes. This is because jobs often have the same time patterns in several PlanMill instances but we don't want the same heavy transaction to execute at the exact same time in each instance. So if Shift is set to 45 and the job has a time pattern "* ** ** 02 10", it would actually be executed at 02:55, not 02:10. "Time interval" is not affected by this mechanism.
(Note: this list is by no means all-inclusive, nor can it be since new jobs are created so often as either standard or custom implementations...)
| Job name
|Alert, ***|| Alert = Reminders and What's new in My workspace
These are alert jobs; they watch for specific conditions in the system and generate alerts which are then displayed in My workspace.
|Assignments, update assignment phase actual||This is the phasing job (Finnish nick name used by our programmers is "putkitus") that re-calculates assignment phases as new time reports are created or phases are edited in work scheduler.|
| Basware BT server send (E-invoice)
||Transfers invoices to Basware's delivery folder, from which they are then sent to Basware's servers for processing.|
|Basware BT server receive (E-invoice)|| Reads response messages from Basware, which no longer sends them to us (so basically this job does nothing).
| Billing rules, normal
|| Billing rule processing. Billing rule is used to price time reports and collect them to correct revenue items.
| Clean, history tables
||Goes through all history tables and removes stale rows according to specific rules; basically prevents the history tables from growing too large.|
|Clean, report temp-file||Cleans data files from the report directory; report data is dumped on disk to reduce database load. Usually anything older than a day gets removed.|
|Currency, update exchange rates|| Loads new currency exchange rates from the European Central Bank. See Multi-company and multi-currency
|Mail Framework, reader|| This is the NEW email capture system (from version 12.7). More information Email Capture or in Finnish Email Capture - sähköpostin luku PlanMilliin
|Mail, Request mail auto-capture||This is the OLD email capture system.|
|Mail, send job error messages|| Sends the execution error mail (although each execution also clears the message cache and no mail is sent if there is no information to send).
|Mail, Send pending mail|| Sends mail from Planmill to other mail servers; this is the main OUTGOING mail delivery system (used for all e-mails except execution errors).
|Netvisor Service|| Sends invoices to Netvisor's servers; see more detailed documentation elsewhere.
|Time reports, auto-accept|| Auto-accepts time reports (changes time report status to "Accepted" from "Reported" or "Preliminary"). Auto-acceptance is done only if selected in project's Overview / Settings / Auto-Accept time reports "Yes". See more information in Accept and edit time reports
|Trigger mechanism||Refreshes various caches based on flags under "System.Flags" (which can be set for all instances with the RefreshTool in the /share instance).|