Configure a custom task execution schedule


Via the UI, you can select from a number of pre-defined collection schedules. Sometimes it is useful to be able to specify a custom schedule - e.g. specify some number of minutes after the interval (instead of at 00:00, 00:05, 00:10, 00:15.. if you want to run at 00:01, 00:06, 00:11, 00:16). This can be useful in handling late-available data situations or to avoid having all the extractions hit the source at the same time.

Instructions

  1. Locate and edit the swp.conf file /opt/streamweaver/conf/swp.conf on linux
  2. Add custom schedule entry - see example below. This should be outside the top-level neo scope e.g. simply at the end of the file is sufficient
  3. Configure a stream in the usual way
  4. Edit the JSON for the Collector and change existing schedule to reference the custom schedule
  5. Restart SWP (to cause to load the swp.conf file)

Example custom schedule:

akka.quartz {
    schedules {
      "MYSCHEDULE" {
        description="Triggers every 5 minutes on the ones and sixes (00:01, 00:06, 00:11, 00:16, ...)"
        expression = "0 1/5 * * * ?"
      }
    }
  }

JSON entry to change

{
  "origin": "09c77f17-ab31-473a-a6ef-abcb687b14ee",
  "scheduleName": {
    "choice": "MINUTES-05",    <<<<<< CHANGE THIS "MYSCHEDULE" (or your schedule name)
    "dependentValues": {}
  },

Notes:

the expression field is a standard ‘cron’ expression

the schedule name MUST be in uppercase

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*