Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
/ cf-crontab Public archive

A crontab scheduler in a 16MB microservice for Cloud foundry

License

Notifications You must be signed in to change notification settings

loafoe/cf-crontab

Repository files navigation

cf-standalone

Run a crontab like scheduler as a (16MB) microservice on Cloud foundry. It knows how to trigger http, amqp, cartel and iron events. Uses bound services for credentials retrieval.

Requirements

Pick one and replace where you see HOST_HERE

Deployment

Use the below template manifest and fill in above values, save as manifest.yml

applications:
- name: cf-crontab
  disk_quota: 128M
  docker:
    image: loafoe/cf-standalone:0.0.8
  env:
    CF_CRONTAB_SECRET: PASSWORD_HERE
  instances: 1
  memory: 16M
  routes:
  - route: HOST_HERE.cloud.pcftest.com

Save the above template with your values and then deploy:

cf push -f manifest.yml

Config

For now you can only inject the config via the ENV:

Password

echo -n 'username:password'|base64

Tasks

You define tasks using the below JSON. A more detailed description and of all supported and planned tasks will follow soon. For now we have http:

[
    {
      "schedule": "*/5 * * * * *",
      "job": {
        "type": "http",
        "command": {
          "headers": {
              "Authorization": "Basic BASE64"
          },  
          "body": "{ \"countToProcess\": 0, \"serverName\": \"string\"}",
          "method": "POST",
          "url": "https://dm-sftp-poller.eu-west.philips-healthsuite.com/poll"
        }
      },
      "entryID": 1
    }
]

Standalone config

Add above JSON struct to CF_CRONTAB_CONFIG environment variable

Contact / Getting help

License

License is MIT

About

A crontab scheduler in a 16MB microservice for Cloud foundry

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published