📦
OpenHIM Platform
  • OpenHIM Platform
  • Getting Started
  • 📜Recipes
    • Central Data Repository with Data Warehousing
    • Central Data repository (no reporting)
    • Master Patient Index
  • 📦Packages
    • Interoperability Layer Openhim
      • Local Development
      • Environment Variables
    • Monitoring
      • Environment Variables
    • Kafka Mapper Consumer
      • Local Development
      • Environment Variables
    • Data Mapper Logstash
      • Local Development
      • Environment Variables
    • Job Scheduler Ofelia
      • Local Development
      • Environment Variables
    • Analytics Datastore - Clickhouse
      • Local Development
      • Environment Variables
    • Analytics Datastore - Elasticsearch
      • Local Development
      • Running in Clustered Mode
      • Environment Variables
    • Client Registry - SanteMPI
      • Environment Variables
    • Dashboard Visualiser - Jsreport
      • Local Development
      • Environment Variables
    • Dashboard Visualiser - Kibana
      • Local Development
      • Environment Variables
    • Dashboard Visualiser - Superset
      • Local Development
      • Environment Variables
    • Message Bus - Kafka
      • Local Development
      • Environment Variables
    • FHIR Datastore HAPI FHIR
      • Local Development
      • Environment Variables
    • Kafka Unbundler Consumer
      • Environment Variables
    • Message Bus Helper Hapi Proxy
      • Environment Variables
    • Reverse Proxy Nginx
      • Local Development
      • Environment Variables
    • OpenFn
      • Environment Variables
    • Reverse Proxy Traefik
      • Environment Variables
  • 🗒️Cheat sheet
  • Architecture
  • Guides
    • Provisioning remote servers
      • Ansible
      • Terraform
    • Resource Allocations
    • Disaster Recovery Process
      • Elasticsearch
      • HAPI FHIR Data
      • OpenHIM Data
    • Development
      • Config Importing
    • Performance Testing
  • Community
Powered by GitBook
On this page
  • Ofelia - Job Scheduler
  • Example of a job config

Was this helpful?

Edit on GitHub
Export as PDF
  1. Packages
  2. Job Scheduler Ofelia

Local Development

A job scheduling tool.

PreviousJob Scheduler OfeliaNextEnvironment Variables

Last updated 2 years ago

Was this helpful?

Ofelia - Job Scheduler

The platform uses image: mcuadros/ofelia:v0.3.6 which has the following limitations:

  • Ofelia does not support config.ini files when run in docker mode (which enables scheduling jobs with docker labels) thus we need to always use the config.ini file for creating jobs.

  • Ofelia does not support attaching to a running instance of a service.

  • Ofelia does not support job-run (which allows you to launch a job with a specified image name) labels on non-ofelia services (ie. you may not specify a job of type job-run within the nginx package as ofelia will not pick it up)

  • Ofelia only initializes jobs when it stands up and does not listen for new containers with new labels to update it's schedules, thus Ofelia needs to be re-up'd every time a change is made to a job that is configured on another service's label.

Example of a job config

An example of job config in the file config.example.ini existing in the folder <path to project packages>/job-scheduler-ofelia/.

[job-run "renew-certs"]
schedule = @every 1440h ;60 days
image = jembi/swarm-nginx-renewal:v1.0.0
volume = renew-certbot-conf:/instant
volume = /var/run/docker.sock:/var/run/docker.sock:ro
environment = RENEWAL_EMAIL=${RENEWAL_EMAIL}
environment = STAGING=${STAGING}
environment = DOMAIN_NAME=${DOMAIN_NAME}
environment = SUBDOMAINS=${SUBDOMAINS}
environment = REVERSE_PROXY_STACK_NAME=${REVERSE_PROXY_STACK_NAME}
delete = true

You can specify multiple jobs in a single file.

📦
Job Docs