Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron job management #1

Open
JherezTaylor opened this issue Dec 10, 2017 · 0 comments
Open

Cron job management #1

JherezTaylor opened this issue Dec 10, 2017 · 0 comments
Assignees

Comments

@JherezTaylor
Copy link
Member

JherezTaylor commented Dec 10, 2017

Goal

  • It would be nice to have a standard way to manage all the cron jobs we will eventually use via HTTP requests.

Deliverables

  • Flask app
  • Investigate the feasibility of managing cron jobs via HTTP requests
  • Define routes that refer to a specific function name and listen for POST requests
  • Should start, stop, restart cron jobs that manage underlying python processes
  • Can be something basic for now, in the future the route should also accept an authentication token and check it against a database to ensure that a valid user sent the command

Example

@app.route('/process1/<command>')
def manage_process1(command):
    # Send  start, stop, restart command to some cronjob
    job = cron.find_comment('process1')
    if command === 'start':
        job.enable()

Links

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

No branches or pull requests

2 participants