Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add functionality for handling "unsafe" jobs #14

jeremyong opened this Issue Jan 13, 2013 · 2 comments


None yet
2 participants

jeremyong commented Jan 13, 2013

Feature proposal

Currently, erlcron supports the handling of arbitrary function calls to Erlang. It would be nice to provide a convenience layer for handling external scripts (via os:cmd/1 for example).

Things to take care of:

  • Actual script execution and API
  • Storing the PID for cancellation purposes
  • Providing a cancel function that terminates the stored PID and/or all child PIDs spawned
  • Piping process output to a log somewhere so that erlcron can return the log after being given a jobref

I am uncertain of the following:

  • OS compatibility (I use linux primarily with a bit of osx)
  • Job ref syntax

This feature will have to make some assumptions about the external service being run. Thoughts?


ericbmerritt commented Jan 17, 2013

@jeremyong I think that should be fine. I don't think we need to change any of the erlcron internals for this (I may be wrong on that). This should be doable as a set of convenience modules that make wrapping os functionality simpler.

On the PID, we actually return a job ref to cancel a job. I don't suspect that needs to change. Though, we may need to think about modeling jobs a bit better to support that.


jeremyong commented Jan 17, 2013

By PID, I don't mean an erlang pid() but the process ID on the OS level. If we run scripts external to erlang, the user may want to cancel them (and any child processes) that the process spawns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment