Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

What is a watchdog and how can I use it to update my database for each minute

I need to change the value of a field on a model if it has expired time. I need to check it every minute and I've been told to use a watchdog with a cron job to update my database. As I know a cron job is provided from a hosting and I don't see how this fits to use it with the web framework (Django).

I'm really lost with this concept and just hope somebody could help me get through this.

1 Answer

Hi Shon

As far as i am aware the watchdog package is more to do with monitoring directories for changes i. e files created,deleted etc. When these file system changes occur you can do something with that event. I recently build a command line app for work, where if a files gets created a batch file gets called and run. To do this i used the watchdog package.