Live data from Hacker News

Plan – Cron jobs in Python

github.com

1–10 of 19 posts

Re: Plan – Cron jobs in Python

#3
I don't get it. What's so hard about cron jobs that you have to write a wrapper for it? It is easy to understand if you just read the crontab file comment at the top. There is just two commands:

    crontab -l
for listing

    crontab -e
for editing. What else do you need?

With this, instead of learning crontab simple syntax, you need to:

- install this package

- learn its API

- run it and still edit the crontab file :D

seems like not worth it.

Re: Plan – Cron jobs in Python

#4
post #3

I don't get it. What's so hard about cron jobs that you have to write a wrapper for it? It is easy to understand if you just read the crontab file comment at the top. There is just two commands: crontab -l for listing crontab -e for editing. What else do you need? With this, instead of learning crontab simple syntax, you need to: - install this package - learn its API - run it and still edit the crontab file :D seems…

Whenever gem does the same thing. So you can keep it under version control with your project.

Re: Plan – Cron jobs in Python

#5

And if you are already using Celery, it has crontab feature http://celery.readthedocs.org/en/latest/userguide/periodic-t...

Yeah, we are using that as well. It's nice because it hooks up to your Django admin and people with the right permissions can reschedule stuff.

I don't see any use case for Plan, it's just complicating an easy task.

Re: Plan – Cron jobs in Python

#6
post #4
post #3

I don't get it. What's so hard about cron jobs that you have to write a wrapper for it? It is easy to understand if you just read the crontab file comment at the top. There is just two commands: crontab -l for listing crontab -e for editing. What else do you need? With this, instead of learning crontab simple syntax, you need to: - install this package - learn its API - run it and still edit the crontab file :D seems…

Whenever gem does the same thing. So you can keep it under version control with your project.

It's just a text file, why not just add it to the version control of your project?

If it's because users can only have a single crontab, you can always use system crontabs instead or "cat" them together.

Re: Plan – Cron jobs in Python

#7
post #4
post #3

I don't get it. What's so hard about cron jobs that you have to write a wrapper for it? It is easy to understand if you just read the crontab file comment at the top. There is just two commands: crontab -l for listing crontab -e for editing. What else do you need? With this, instead of learning crontab simple syntax, you need to: - install this package - learn its API - run it and still edit the crontab file :D seems…

Whenever gem does the same thing. So you can keep it under version control with your project.

You can install a new crontab file with

    $ crontab [ -u user ] file

Re: Plan – Cron jobs in Python

#8
Here is some brainstorming on use cases.

1. You can validate cron jobs and programmatically change or reject some of them. Or maybe just offer a small set of services as a cron job.

2. Once you have a security model you can expose this as a web service and offer cron jobs over the web.

3. You could extend this API to use different implementations of cron. Instead of calling the actual cron you could implement cron in Python or maybe use a cron web service.

Re: Plan – Cron jobs in Python

#9

Here is some brainstorming on use cases. 1. You can validate cron jobs and programmatically change or reject some of them. Or maybe just offer a small set of services as a cron job. 2. Once you have a security model you can expose this as a web service and offer cron jobs over the web. 3. You could extend this API to use different implementations of cron. Instead of calling the actual cron you could implement cron in…

This would be useful incase, if you want to set cron dynamically.Based on the executed result, next step can be manipulated via this.

Re: Plan – Cron jobs in Python

#10
post #5

And if you are already using Celery, it has crontab feature http://celery.readthedocs.org/en/latest/userguide/periodic-t...

Yeah, we are using that as well. It's nice because it hooks up to your Django admin and people with the right permissions can reschedule stuff. I don't see any use case for Plan, it's just complicating an easy task.

I can see one use case for this family of tools: if the same script could generate either crontab files or launchd agents, so it could generate scheduling files for MacOSX, where crontab is discouraged.
Post reply on HN