Introduction
The Syrinx Task Scheduler module is a Windows Service that runs on a server to produce a set of reports, and email these reports to designated customers and staff members or perform various maintenance/integration tasks with the Syrinx data. Reports are run using the Crystal Reports .Net runtime, so that any custom report installed and in use in the Syrinx program may be emailed. Reports are emailed using SMTP, so therefore access to an SMTP server is required to use this module. The following guide will detail installing the scheduler, configuring reports for the scheduler and configuring the scheduler to run those reports and other tasks.
Note: There is currently no support for running custom hire utilisation reports which require “pre-processing” when run in Syrinx.
Installation
A separate patch SyrinxReportScheduler.syp must be run against the Syrinx database to enable the module. To install the software, download and run the task scheduler installer:
https://www.syrinxusers.co.uk/Task%20Scheduler/TaskScheduler2020Installer.msi
username: download
password: c0nc3pt
**A zip version of the installer can be download which contains a generic email template as well as a generic Equipment Onhire Report and a generic Customer Service Reminder Letter Report:
https://www.syrinxusers.co.uk/Task%20Scheduler/TaskScheduler2020Installer.zip
The Crystal .Net 11.5 SP4 Runtime is also require and must be installed if not already installed on the server:
https://www.syrinxusers.co.uk/Non-Syrinx%20Client%20Files/CR11.5.Net%20SP4.zip
username: download
password: c0nc3pt
Report Definitions
Any reports that are to be run through the scheduler must first be defined using the “User Report Definitions” screen on the Documents menu in Syrinx SP Configuration. Once any reports have been defined, these should be tested interactively from the Reports option within the main Syrinx program, to ensure they function as expected.
Server Central Reports Area
Once tested, the Crystal Reports Files (.rpt) for the reports to be scheduled must then be made available to the server on which the scheduler will be running. All report files must be accessible from a single root folder on the report server or the Syrinx database server.
Email Template
Email messages may be sent to customers/staff members in either plain text or html format. If html is to be used, then the template html file (EmailTemplate.htm) should be copied to the server and edited as required, for example to enter any company specific disclaimer text. Note that the tag text '|1' in the template will be replaced with the email body text defined against the report schedule (see below).
Report Schedule
Most reports in the Report schedule specify that a particular report is to be sent to a particular customer/supplier, or an internal report is to be sent to a given set of staff members. Use the “Report Scheduler” screen on the Documents menu of the Syrinx Configuration program to add and amend details of the reports to be scheduled:
When adding a new entry, you start by picking the report you want to be scheduled, and then pick the customer/supplier that the report is being sent to, and enter the path to the report file. The path must be relative to a root folder that contains all report files:
You can also enter the text to be used for the email's subject and body contents. Use the Recipients tab to select the customer/supplier contacts and/or staff members that the report is to be sent to:
The Set Email button can be used to set or update the email address for the selected contact or staff member. You can choose to send as CC or BCC. The Frequency tab is used to indicate how often the report is to be sent:
The parameter values to be used when the report is run can be set via the Parameters tab:
For date and date range parameters, you must pick from a set of dates that are determined relative to the date on which the report is being run:
Once all the details have been entered, use the Make Active button to indicate that the report is now ready to be run. Once active, you can use the Last Run tab to see when the report was last run, and when it is due to run next:
Note: If an error occurs when a report is run, the Next Run Date will be cleared, and consequently the running of the report will be suspended. Once the problem has been addressed you can use the Reset button to set the Next Run Date so that the report will then be picked up by the scheduler again.
“All Customers” Reports
There are two special reports, “Customer Service Reminders - All Customers” and “Equipment on Hire - All Customers” available in the system that can be set up and linked to specific customer contacts so that one scheduled “Report” entry can be used to send a report to multiple different customer’s contacts. These reports are added to the “Report Scheduler” as per the previous section but the “Recipients” for those reports are defined against customer or contact records in the main Syrinx program meaning that the “Recipients” tab of the “Amend Report Schedule” screen will not be used to determine who receives these reports.
The “Customer Service Reminders - All Customers” report will be sent to the customer contact defined as the “Servicing Contact” on the “Details” tab of a customer record:
The “Equipment on Hire - All Customers” report will be sent to customer contacts who have a value set in the “On Hire Report:” option on the “Misc” tab of their associated contact record:
Output Scheduled Report Data to File System
Scheduled reports can also be configured to output the data from a report to a file in a specified folder. This is controlled via the “Output Format” dropdown on the “Amend Report Schedule” by selecting one of the “…to File” options:
With one of these options selected, a “File Output” tab will be exposed on which the user can define the file output path as well as the filename:
“|D” and “|T “tokens can be used in the “File Name” entry to include the date and time when the file was generated.
*Note – The windows account that the Syrinx Task Scheduler service is running under must have the appropriate share and security permissions to write to the location specified in the “Output File Path” field.
Configuring and Testing the Task Scheduler
To configure and test the task scheduler, select the “Configure Task Scheduler” option from the Syrinx program group in the Windows Start menu. The operation of this screen is similar to the Accounts Transfer program, in that a user can set up multiple configurations for connections to different Syrinx databases and can also run the scheduler interactively to test its operation. Press the “Add” button against the “Connection” area to add a connection to a new Syrinx database:
And then enter valid connection details to the Syrinx database when prompted:
Once connection to the database has been established and the “Connection” has been added to the scheduler, press the “Amend” button from the main Task Scheduler screen to further define the details for that connection. The following details can be entered against a connection entry:
|
Setting |
Description |
|
Report Files Folder |
The local directory where the crystal report files (.rpt) for any scheduled report are held. You can browse to that folder using the button to the right of the field. |
|
Mobile Images Folder |
If using the Syrinx Driver or Workshop Apps, this is the local directory on the server where archived mobile images are stored. You can browse to that folder using the button to the right of the field. |
|
SMTP Host |
The address of the mail server used for sending the task scheduler emails (e.g. smtp.gmail.com) |
|
Port |
The port number used when connecting to the mail server (e.g. 587) |
|
Email Account |
The email address/account to be used when authenticating against the email server. Normally the same as the “Send From” value. |
|
Password |
The password used for the email account that will send emails on behalf of the scheduler. |
|
Use SSL? |
Enable this option if the mail server requires a secure connection (e.g. SSL or TLS) |
|
Use Gmail OAuth2 |
Feature is currently unavailable and should not be enabled |
|
Send From |
The email address/account to be used when sending emails via the scheduler. Normally the same as the “Email Account” value. |
|
Template File |
The location of the email template to be used when sending scheduled reports via the scheduler. The user can browse to that file using the button to the right of the field. |
|
Send Test Email |
Use this button to send a test email using the given settings. |
Note: If the paths entered on this screen or any of the configuration screens referenced below are not local to the server on which the scheduler is running, the account that the task scheduler service is running under should been granted the appropriate share/security permissions to access those network resources and the paths should be set as UNC paths to the network resource as the service will not be able to access “mapped” drives.
After completing entry of the details for a specific connection, press “OK“ at the bottom of the “Amend Connection” screen to save your changes. If the Syrinx Task Scheduler service was running when a new connection was added, it should be restarted once the new connection details have been saved.
Once the connection specific details have been saved it is now time to create a “Configuration” entry for the connection. A configuration entry allows the user to define the specific tasks that the scheduler will run, the frequency of those tasks and, if necessary, specific log file folders and contacts who should be emailed regarding the status of those tasks. To start the process of creating a configuration entry, press the “Add” button to the right of the Configuration selection box:
And then enter a name for the configuration entry:
In most cases, users will only create one configuration entry per connection which will in turn run all available tasks for that Syrinx database. After pressing “OK” to create the configuration entry, the “Amend Configuration” screen will be displayed where the following details can be entered:
|
Setting |
Description |
|
Log Files Folder |
The local directory where all log files generated by the task scheduler will be stored. You can browse to that folder using the button to the right of the field. |
|
Send Logs To |
The email address where logs should be emailed. |
|
Send All Logs? |
Enable this option to email all logged events to the “Send Logs To” email address. If disabled, only details of any errors encountered when running scheduled tasks are sent. |
After completing entry of the details for a specific connection press the “OK“ button at the bottom of the “Amend Configuration” screen to save the changes.
Once the configuration entry has been added for the connection, the “Task Configuration” button will now be active for that configuration:
Pressing this button will open the “Task Configuration” screen which displays all of the tasks available to the scheduler with their specific frequency settings along with any override values for an “Error Log Folder”, “Send Logs To” email address and “Html Template File” to be used when emailing the results of that specific task:
The “Configuration Overrides” for a specific task can remain blank unless the user wishes to override the details for the values previously set against the main “Configuration” entry. When a user amends the “Frequency Settings” for a specific task, the “Last Run Date” against that task will be cleared and the task will next be run by the scheduler service when it meets the new frequency settings set against that task.
Note: It should not be necessary to amend the “Frequency” of the “Scheduled Reports” task as, unlike other tasks handled by the task scheduler, the reports themselves have their own frequency settings as set in the Syrinx Configuration program. As such, this task should be left with its default frequency of running every 5 minutes so that scheduled reports are picked up as and when they meet the conditions for their own specific frequency settings.
The 1st scheduler configuration added to a database will have all tasks “Active” by default and specific tasks can be disabled if necessary by selecting the specific task and pressing the “Switch” option next to the “Active” icon for that task. After pressing the switch option against a task, the user will be prompted to disable the task (i.e. task is temporarily suspended from running) or to make the task inactive (i.e. details of that task with be removed):
Any subsequent configurations added to the database will create all tasks with an “Inactive” status and each individual task required to run under the additional configuration will have to be manually set as “Active”.
Note: From Syrinx version 4.40.6, The Syrinx Task Scheduler no longer requires Admin Access in windows in order to run and configure the tool prior to starting the Task Scheduler service. If the Task Scheduler is run as Administrator, the UI and service will continue to store and read its configuration information in the Local Machine registry key as per previous versions. If the Task Scheduler is not run as Administrator, it will store and read its configuration information in an encrypted config.dat file in C:\ProgramData\Higher Concept\Task Scheduler. Existing customers who have the Task Scheduler and upgrade to this new version should have their Task Scheduler programs set to "Run as Administrator" if they can no longer view/edit its configuration information through the UI, the service itself should still run as expected as it will continue to read the configuration information from the Local Machine registry key.
Starting the Task Scheduler Service
The service is not started automatically after installation, so the user must go to Windows Start
/ Control Panel / Administrative Tools / Services, and scroll down to the “Syrinx Task Scheduler” entry and click on the Start link. The service will run tasks and/or email reports according to their specific schedules.