Contents
Finance Scheduled Jobs
Updated by Steve Findon
The system uses Scheduled Jobs to carry out actions automatically in the background. There are numerous Scheduled Jobs used by the system, five of which affect the Finance functionality (Business Module = Care Provider Invoicing), and all of which are outlined below. These System Jobs will already be created, but there is the need for you to determine the frequency and times of these. Suggestions have been made, but the final decision is yours. The fields to determine frequency are as follows:
- Next Run Date / Time
- Schedule Setting
- Every (X) Minute(s)
- Daily
- Weekly
- Every (X) Minutes
- Visible only where Schedule Setting = Every (X) Minute(s)
- Recur Every (Days)
- Visible only where Schedule Setting = Daily
- Recur Every (Weeks)
- Visible only where Schedule Setting = Weekly
- Days of the Week (Monday to Sunday)
- Visible only where Schedule Setting = Weekly
Under Settings > Configuration > System Management > Scheduled Jobs, the following Scheduled Jobs can be found:
Process CP Finance Transaction Triggers
- This Scheduled Job processes records in Finance Transaction (FT) Triggers
- For a listing of all records on the system, navigate to Settings > Configuration > Finance Admin > Care Provider Invoicing > Finance Transaction Triggers
- For a listing of records for a specific Person Contract Service (PCS), navigate to Workplace > Finance > Person Contract Services > open a record > Menu > Related Items > Finance Transaction Triggers
- These Triggers records are created as a result of changes to various relevant Finance records being created, updated, ended or cancelled
- As Finance Transactions are associated with PCS records, the value stored in the Data Item = Record, needs to be a PCS record
- However, most changes are not made to PCS records. Where this is the case, the Data Item = To Expand? = Yes. Therefore, when the Schedule Job runs, whenever a Trigger record has this setting, the system will expand that single record to multiple records, so that every PCS affected, has its own Trigger record (and To Expand? = No). So one record when expanded could create 1 new record or could create 1,000+ new records
- Every Trigger record has a Reason associated to it and this identifies what caused (and from where) a Trigger record to be created
- The Trigger record moves through different Statuses as follows:
- New – Default value and indicates the Schedule Job has not processed this record
- Processed – Indicates the Schedule Job has processed this record and no errors occurred
- Error – Indicates the Schedule Job has processed this record, but an error has occurred. There is an Error Trace field and this may give information as to why the Error occurred
Note:
Once the reason for the error message has been resolved, you're able to change the Status back to New so the Trigger record can be processed again. If it was a missing Financial Invoice Batch Setup (FIBS) record, then creating that record would create a trigger record anyway. However, this option gives the User control just in case it is required. To action, go into an FT Trigger record where Status = Error and in the toolbar, the following option will be available:
- The action of successfully processing a Trigger record (in cases of PCS records) is to:
- Where FTs have not been previously generated for the PCS, to create them
- Where FT’s have been previously generated for the PCS, to recreate all FT’s and compare them to existing FT records and, if any are different, delete the existing ones and replace them with new ones. However, if the existing FT record has already been associated with a Finance Invoice (with any status), instead of deleting and replacing, the original FT is contra’d (i.e. copied, but with opposite monetary values) and a new FT is created
- The suggestion is to run the scheduled job every 2 to 5 minutes (it can be longer, but no longer 30 minutes) which effectively means when viewing Finance Transactions, they always show almost real time values
Remove Finance Trigger records
- This Scheduled Job looks for Finance Transaction Trigger records where the Status = Processed and will delete any that have a Modified On date greater than X days ago
- X days can be set by recording a Setting record against the Schedule Job as follows:
- Name = FTT Deletion (MUST be this name)
- Value = Number of days (suggestion is 28)
- This job is used to keep the Finance Transaction Trigger records as clean as possible and not full up with unnecessary records
Process CP Finance Invoice Batches
- This Scheduled Job looks for Finance Invoice Batch (FIB) records where Status = New, and their Run On Date/Time is in the past, and processes them. This could mean one or more FIB records are processed at the same time
- This will generate Finance Invoices based on the settings associated with the FIB/FIBS record
- The suggestion is to run the scheduled job once a day overnight @ 01:00 and the Finance Invoices will be ready to review and complete first thing in the morning. If the Finance Invoices are required earlier or later (e.g. due to a Bank Holiday), then the Run On Date/Time should be changed on the FIB record(s)
- If you wish to run a single FIB record, then:
- Open the FIB record
- Ensure the Run On Date/Time is set in the past at the point the Run Invoice Batch option below is clicked (the system prevents setting the Run On Date/Time to be in the past, so set it to the as present Date/Time, if it needs changing)
- Click the Run Invoice Batch toolbar option:
Process CP Finance Extract Batches
- This Scheduled Job looks for Finance Extract Batch (FIB) records where the Status = New, and its Run On Date/Time is in the past, and processes them. This could mean one or several FEB records are processed at the same time
- This will extract Finance Invoices based on the settings associated with the FEB/FEBS record
- The suggestion is to run the scheduled job once a day overnight @ 02:00 and the Finance Extract Files will be generated ready to action first thing in the morning. If the Extracts are required earlier or later (e.g. due to a Bank Holiday), then the Run On Date/Time should be changed on the FEB record(s)
- If you wish to run a single FEB record, then:
- Open the FEB record
- Ensure the Run On Date/Time is set in the past at the point the Run Invoice Batch option below is clicked (the system prevents setting the Run On Date/Time to be in the past, so set it to the as present Date/Time, if it needs changing)
- Click the Run Invoice Batch toolbar option:
Process CP Finance Code Update Triggers
- This Scheduled Job processes records in Finance Code Update Triggers
- Navigate to Settings > Configuration > Finance Admin > Care Provider Invoicing > Finance Code Update Triggers (listing of all records)
- These Triggers records are created as a result of changes to various relevant Finance records being created, updated, ended or cancelled
- Every Trigger has a record associated with it and this identifies what was updated that may require Finance Codes needing to be changed on the Person Contract Service records
- The Trigger record moves through different Statuses as follows:
- New – Default value and indicates the Scheduled Job has not processed this record
- Processed – Indicates the Scheduled Job has processed this record and no errors occurred
- Error – Indicates the Scheduled Job has processed this record but an error has occurred. There is an Error Trace field and this may provide information as to why the error occurred
- The action of successfully processing a Trigger record is to:
- Update the Finance Code on the Person Contract Service record, where a change is required
- If the Finance Code is updated, this in turn creates a Finance Transaction Trigger record, as the Finance Transactions will need their Finance Code updating
- The suggestion is to run the scheduled job every 2 to 5 minutes (it can be longer, but no longer than 30 minutes) which effectively means when viewing Person Contract Service and Finance Transactions, they always show almost real time values for Finance Code