0

We are making a new design for a system that will receive a lot of files during the day, and on the night, they will be processed.

But while i am thinking about it, i face some questions:


1) What should I do about the Cron Application?

a) A console application that when it runs, it retrieves all the files and executes them (setting this app for running every day)? Or..

b) a console application that uses Quartz.NET or some scheduler like this one and leaving it always running so everyday it executes the cron job?


2) How can i do if i want to run the cron just for 3 hours for example?

We will have a high volume of files to process, so, it is possible that it takes a lot to process them. And i don't want the cron application to be running on working hours because the companies will be using the website a lot for sending files, and the database might not be able to resist that. I would like the cron application to run for example from 3am to 6am. How can accomplish that?


3) How can i do for disabling the website when the cron application is running?

I mean, for showing something like an html webpage that says: "We are processing the files right now, try again at 6am"


I would really appreciate any experience, any advice, any article for reading something related, etc.

LeftyX
  • 35,328
  • 21
  • 132
  • 193
ascherman
  • 1,762
  • 2
  • 20
  • 41
  • the windows task scheduler doest most of that - you can time-limit jobs. as for shutting down the site, the job itself can do that. e.g. `shut_down_site(); process_stuff(); if (done or time limit reached) { start_site_again(); }` – Marc B May 12 '15 at 17:39
  • Could you tell me how can i set a time-limit job? Because i can't find it... And how can i do the shut_down_site() method? I don't know how can i do from one application, to make another one be disabled... – ascherman May 12 '15 at 17:54
  • task scheduler -> create task -> "settings" -> "stop the task if it runs longer than" – Marc B May 12 '15 at 19:06
  • Read [this](http://stackoverflow.com/questions/5115105/quartz-net-vs-windows-scheduled-tasks-how-different-are-they). You may not need Quartz.NET if your requirement is simple. – Nick Patsaris May 13 '15 at 12:31

0 Answers0