i am working on global.asax in mvc, what issues i'm facing is,i have set a scheduler to start global and its working well but after starting the global i got data, but suppose data is not available upto next 20 min global process has stopped. now after 20 mins data is came from server but the global is stop so i cant get the data from global. now the question is, how can i increase time of global process to 60 min or something..or how can global starts whenever data came.
here is my code
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 300 * 1000; //60*1000 means 1 min
//timer.Enabled = true;
timer.Elapsed +=new System.Timers.ElapsedEventHandler(Daily_Attendance_RFID);
timer.Start();
Application.Add("timer", timer);
}
static void Daily_Attendance_RFID(object sender, System.Timers.ElapsedEventArgs e)
{
//*** For RFID Attendance Function ***//
Daily_Attendance.Daily_Attendance_RFID();
}