Python or Bash commands to determine time since a cron job string would have triggered

I'm writing a Django app (although parts can be Bash) that stores the cron job strings of many other machines. It needs to calculate the amount of time since that cron job would have triggered on that machine. Is there a python library useful for converting cron style strings to another Python friendly scheduler format that has a function for determining when that should have last triggered?

For example: a machine has a cron job at "0 8 * * 1-5" (every weekday at 8am local time to that server). Assuming my Django app was in the same time zone, and the current time was 10:15 AM on a Tuesday, then my app would need to be able to calculate 2 hours and 15 minutes as the answer.


Celery is the package that's usually used with Django for job scheduling. It has a module for parsing cron specs. It might be of use.

Need Your Help

add multiple images from openfiledilog to imagelist and display them in the listview


hello friends i am new to c# i am in a project and i want help

interrogate the Data in Lync 2010?

c# silverlight visual-studio-2010 lync-2010

I developed a seat plan website - it uses the Lync SDK to pull back user details - (i.e. when a name is clicked on the map it passes the name into the Search box and then lists the person in the re...