I have a Django application that sends emails to customers. I want this application to run in the background after a certain time, is like a job/quote process. What could be best way to do this with Python/Django?
            Asked
            
        
        
            Active
            
        
            Viewed 1,076 times
        
    2
            
            
        - 
                    1This depends on the system, you're on. On Linux, you would use cron. On Windows, you would use Task Scheduler. With Python alone, maybe http://stackoverflow.com/q/373335/1741542 – Olaf Dietsche Oct 06 '16 at 22:08
2 Answers
2
            
            
        How to run django application in background?
This question makes no sense. Django is a web based framework. What do you mean by running a web application in background?
I think you want to ask: How to run periodic background tasks in Django application?
For that purpose you may use Celery. Celery with the help of Message Queueing service allows you to perform tasks in background. It also supports execution of custom script at mentioned duration. Check: Periodic tasks in Celery
 
    
    
        Moinuddin Quadri
        
- 46,825
- 13
- 96
- 126
-1
            
            
        You can use docker And then you can run your web application in the background..... DockerFile
If you want to run script background you can you CRONTAB or scheduler.
 
    
    
        NickCoder
        
- 1,504
- 2
- 23
- 35
 
    
    
        user5943862
        
- 39
- 5
 
    