What are the different approaches for creating scheduled tasks for web applications, with or without a separate web/desktop application?
标签:
scheduled-tasks
相关问题
- Create scheduled task using Task Scheduler Managed
- Using task scheduler for running java jar (from ba
- Powershell Scheduled Task At Startup Repeating
- Scheduling Python script using Python CronTab on W
- facebook apps: scheduling a task
相关文章
- Schedule Rails Task to run at a certain time
- Spring scheduled tasks not firing
- Show failure for SQL 2005 Job that executes Powers
- Chrome 73 stop supporting headless mode in backgro
- Run a scheduled task from web application
- how can i find the instanceid/correlation ID of th
- schtasks /create (Have a task that runs every day
- How to redirect Powershell output from a script ru
I think Stack Overflow itself is using an ApplicationCache expiration to run background code at intervals.
I think Windows' built-in Task Scheduler is the suggested tool for this job. That requires an outside application.
If we're talking Microsoft platform, then I'd always develop a separate Windows Service to handle such batch tasks.
You can always reference the same assemblies that are being used by your web application to avoid any nasty code duplication.
A very simple method that we've used where I work is this:
It's not pretty, but it is simple and reliable. Since the console app is essentially just a heartbeat to tell the app to go do its work, it does not need to share any libraries with the application. Another plus of this methodology is that it's fairly trivial to kick off manually when needed.
Java and Spring -- Use quartz. Very nice and reliable -- http://static.springframework.org/spring/docs/1.2.x/reference/scheduling.html
You can also tell cron to run php scripts directly, for example. And you can set the permissions on the PHP file to prevent other people accessing them or better yet, don't have these utility scripts in a web accessible directory...