Heartbeat

Softadmin requires an external HTTP call to "https://<systemurl>/heartbeat.aspx" be able to process asynchronous operations such as jobs, events etc. It is recommended that this call is made every 5 minutes, but the frequency only affects how long it takes to start these operations after a application or server restart has been made.

The caller should behave as follows:
In case of HTTP status code 200, a new call should be made at the next scheduled time. In case of HTTP status code 202, a new call should be made straight away.

This is usually handled by an external program triggered by the Windows Task Scheduler. This may be done by Softadmin® scheduler, but can be handled by any program performing the above tasks.

Softadmin® scheduler (Optional)

Softadmin® scheduler is optional and may be replaced by a custom program as described above. Softadmin® scheduler can be downloaded here SoftadminScheduler.zip.

Setup

Copy the SoftadminScheduler.exe and SoftadminScheduler.config to the target server, they should be placed anywhere but in the Softadmin®-application folder as it may cause issues for the deploy. Edit the SoftadminScheduler.config to contain the correct URLs. When hosting multiple systems, the <system>-tag should occur multiple times.

Use Windows Task Scheduler with the following properties to trigger Softadmin® Scheduler.

  • General
    • Run whether user is logged on or not.
    • Do not store password
    • Select "Change User or Group" and choose a user with read and execute rights for the exe- och config-files.
  • Triggers
    • Create 2 triggers
      • At startup. This ensures the task is triggered after each server restart.
      • At task creation/modification. This ensures no server restart is needed after creation.
    • Repeat task every: 5 minutes. For duration of: indefinitely.
  • Actions
    • Start a program: Softadminscheduler.exe
    • Start in <The folder where Softadminscheduler.exe is located>
  • Settings
    • Run task as soon as possible a scheduled start is missed.
    • Stop the task if it runs longer than: 1 hour.
    • If task is already running, the the following rule applies: Stop the existing instance.

Troubleshooting

To troubleshoot problems, run the exe from the command prompt with the flags /SingleThreaded and /Verbose.
SoftadminScheduler.exe /SingleThreaded /Verbose

Common error codes for Softadmin scheduler

As seen in event viewer.

  • 0 – Success.
  • 2147942401 – Unknown error.
  • 2147942402 – Configuration file not found.
  • 2147942403 – Invalid configuration file.
  • 2147942404 – One or more calls failed.
  • 2147942405 – One or more calls timed out (only warning).
Common error codes for Windows task scheduler

As seen in event viewer. There is no guarantee the error code only maps to the error below.

  • 2147943726 – Incorrect password. Most common is the user changed passowrd.
  • 2147944187 – Missing permissions to read the config file.
  • 2147942405 – Missing permissions to execute the exe file.