HNHacker News
TopNewBestAskShowJobs

ccannon

54 karma · joined October 28, 2013

submissionscomments
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
This is why I also store the creation time to avoid reused PIDs.
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
I do, but now with Highlander I've created a generic solution.
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
I think my solution is simpler, but their timeout command line argument has inspired me!
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
I think you could use this with celery tasks so as long as each worker used a different PID file.
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
This is a pure python solution.
ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
To address your concerns:

1. I assume that it's the same type of process because by default the PID file is being written to the current working directory of the script. If you'd like, you can specify a location yourself to ensure that each type of process is grouped on one PID file.

2. Out of curiosity, how would you go about doing this?

3. I think this would be really difficult to accomplish.

4. I agree if we could somehow figure out 2 or 3, that would be great.

ccannon··on Show HN: Highlander – Stop Overlapping Python Cron Jobs
I always encounter the problem where I write Python scripts that run on a cron job that sometimes take longer than the interval before the same cron job will run again (e.g., I have a cron that runs every hour and one run takes 2 hours to complete). In this scenario, you would want the first cron to complete before the second cron is run. What Highlander does is if it sees that your cron is already running, it immediately returns thereby skipping that cron run.
ccannon··on PHP: md5('240610708') == md5('QNKCDZO')
Yes md5 is broken. We've known this for quite some time.
ccannon··on Beginners' Guide to Concurrency and Parallelism in Python
Finally someone who knows what they're talking about!
ccannon··on [dead]
So much so you created an account 2 minutes ago ;)
← PreviousPage 2 of 2