I have a django project and i need the ability for executing a function at a specified time on django server. for example you can consider that in my django project if a client request for friendship to another person if after (say) 7 days that person doesn't answer that request the request will be automatically removed. so i want the ability of calling a function on django server at a specified time that is stored in mysql table.
Asked
Active
Viewed 1,274 times
0
-
Add dates to the corresponding database records, you may create a python script then which loads the django environment and looks for the records and deletes them. The script can be fired via cronjob. – Jingo Nov 18 '13 at 15:38
1 Answers
3
Create a custom command and create a cron job to run it, also you can check some django apps for manage cron jobs/repetitive tasks. I know you can use it on linux (in windows should be alternatives, I my head sounds now schedule task, but must there be other)

juliocesar
- 5,706
- 8
- 44
- 63
-
Also check following related questions: http://stackoverflow.com/q/3287038/2343488 http://stackoverflow.com/q/4519829/2343488 http://stackoverflow.com/q/4519829/2343488 maybe it helps you – juliocesar Nov 18 '13 at 16:03
-