ajvb / kala

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

Add instructions for running a Go function periodically #72

Closed elimisteve closed 8 years ago

elimisteve commented 9 years ago

Can kala do this, or must the Go function be inside a main function in a .go file? Thanks.

(I see https://github.com/ajvb/kala/blob/master/client/client_test.go but that's still just calling a bash command from Go.)

elimisteve commented 9 years ago

Context: I am writing a simple SMS-based app that helps people keep on track with their goals by texting them on certain days per week (initially every day) at the same time on each of those days to remind them, and I'm sending those texts via Twilio from Go. I'd like to use kala to periodically send out those texts.

ajvb commented 9 years ago

@elimisteve This is a great use case that I haven't thought of before.

Can kala do this, or must the Go function be inside a main function in a .go file? Thanks.

Right now, the Go function must be inside a main function in a .go file. I would like to in the future allow for a "Plugin" like architecture within how jobs are ran, so for example you could implement running a Dockerfile (rather than running a bash script that runs a Dockerfile).

For now, I would have a simple CLI where you can pass in the needed info.

Also, please let me know if you have any troubles with deployments and I will be very interested to here how Kala is working for you. Let me know if you have any specific requests, as I prioritize based on what people are asking for :)

ajvb commented 8 years ago

@elimisteve I'm going to marked this closed for now. If you it ends up not being, feel free to re-open.