public void ThreadStop() { try { int _jobCounts = SchedulerManager.CurrentJobsList.Count; SchedulerManager.Stop(); Response.Write(string.Format("Total: {0} Jobs Stopped", _jobCounts)); } catch (Exception ex) { Response.Write("error:" + ex); } }
protected void btnStop_Click(object sender, EventArgs e) { try { int _jobCounts = SchedulerManager.CurrentJobsList.Count; SchedulerManager.Stop(); lblThreadStatus.Text = string.Format("Total: {0} Jobs Stopped", _jobCounts); btnStart.Visible = true; btnStop.Visible = false; } catch (Exception ex) { lblThreadStatus.Text = ex.Message; btnStart.Visible = true; btnStop.Visible = true; } }
public bool Stop(HostControl hostControl) { SchedulerManager.Stop(); return(true); }