Set up a recurring task to spawn workers

To ensure that incoming Helix Core events are automatically processed by Swarm, it is important to set up a cron job to do this. The cron job can be installed on any host, although you may want to place this on the Swarm host.

The recurring task to invoke Swarm workers, installed in a later step, requires either of:

  1. Create a file named helix-swarm in /etc/cron.d.
  2. Edit /etc/cron.d/helix-swarm to contain one of the following blocks; select a block depending on whether your system has curl or wget installed.
  3. Replace myswarm.url above with the actual URL you have configured for Swarm (which may include a sub-folder or a custom port).

    If the cron job is running on the Swarm host, and you have specified the correct hostname item in the Environment configuration, this can be set to localhost.

    In the example configuration lines above, where you see -m5 or -T5, the 5 is the number of seconds that the cron task will wait for a response from the Swarm host. When the cron task is installed on the Swarm host, such as in the Swarm OVA, that value could be reduced to 1 seconds (e.g. -m1 or -T1).


    If you configure Swarm to use HTTPS, and you install a self-signed certificate, the cron jobs need to be adjusted to avoid certificate validity test which could cause silent failures to process events.

    • If you have curl installed:
      # This ensures that a worker is fired up every minute
      * * * * * nobody curl -so /dev/null --insecure -m5 https://myswarm.url/queue/worker
    • If you have wget installed:
      # This ensures that a worker is fired up every minute
      * * * * * nobody wget -q -O /dev/null --no-check-certificate -T5 https://myswarm.url/queue/worker
  4. Save the edited file.

You are now all set to start using Swarm. Enjoy!


If the recurring task is disabled, or stops functioning for any reason, logged-in users see the following error message when Swarm detects that no workers are running:

curl/wget verification

The cron job depends on having curl or wget installed, as indicated in Runtime dependencies.

To verify that curl or wget is installed, use the which command. For example:

$ which curl

If you see any output, the referenced command is installed.