ajvb / kala

Modern Job Scheduler
MIT License
2.13k stars 187 forks source link

How to Link Kala to a Rest Url or Golang Function instead of bash command #128

Closed DNadar closed 7 years ago

DNadar commented 7 years ago

Hi,

My requirement is a time Scheduler which will trigger a Rest API (URL) or a golang Func which could execute after a particular interval just like sending emails, purging Old DB records etc.

Any possible ways as i don't see any examples.

ajvb commented 7 years ago

This was discussed within https://github.com/ajvb/kala/issues/73

Basically, no not at the moment. I have decided not to support calling a Go function, but am willing to support non-exec.Cmd jobs (e.g. hitting a REST API or running a Docker container).

At the moment, the only supported command is a sh/bash command. The easiest way to do this is to write a script that does whatever you want and just call it via Kala.

ajvb commented 7 years ago

With https://github.com/ajvb/kala/pull/139 merged, you can now have an HTTP request as your job.