public static void CreateCronJob(UserConnection userConnection, string cronExpression, string jobName, string jobGroupName, string processName, IDictionary <string, object> parameters, bool isSystemUser = false, bool useMisfireInstructionFireOnceNow = false) { MailingSchedulerUtilities.CreateCronJob(userConnection, cronExpression, jobName, jobGroupName, processName, parameters, isSystemUser, useMisfireInstructionFireOnceNow); }
private void CreateCronJob(UserConnection userConnection) { if (IsScheduledJobExists()) { RemoveInstance(); } MailingSchedulerUtilities.CreateCronJob(userConnection, CronExpression, JobName, JobGroupName, ProcessName, null, false, true); }
/// <summary> /// Creates instance of the handler. /// </summary> /// <param name="userConnection">Instance of user connection.</param> public override void CreateInstance(UserConnection userConnection) { try { MailingSchedulerUtilities.CreateCronJob(userConnection, CronExpression, JobName, JobGroupName, ProcessName, null, true, true); MailingUtilities.Log.InfoFormat("[ActiveContactsHandler.CreateInstance]: Job {0} " + "for process {1} scheduled", JobName, ProcessName); } catch (Exception exception) { MailingUtilities.Log.ErrorFormat("[ActiveContactsHandler.CreateInstance]: Error while scheduling " + "job {0}", exception, JobName); throw; } }