private void startJob(String jobType) { List <WebJob> jobs = cdb.findBy <WebJob>("Type", jobType); WebJob job = jobs[0]; job.IsRunning = true; job.update(); }
public virtual void Start(long id) { WebJob job = cdb.findById <WebJob>(id); if (job == null) { echoRedirect(lang("exDataNotFound")); return; } job.IsRunning = true; job.update(); HttpRuntime.UnloadAppDomain(); echoAjaxOk(); }
public virtual void Update(long id) { int Interval = ctx.PostInt("Interval"); WebJob job = cdb.findById <WebJob>(id); if (job == null) { echoRedirect(lang("exDataNotFound")); return; } job.Interval = Interval; job.update(); HttpRuntime.UnloadAppDomain(); echoToParentPart(lang("opok"), to(List), 999); }