public static ScheduledJobDefinition Create <T>(string cron, T body = default, Dictionary <string, string> attributes = null, List <MetadataAttribute> metadata = null) { var definition = new ScheduledJobDefinition { Cron = cron, Name = typeof(T).FullName, Attributes = attributes, Metadata = metadata }; definition.SetBody(body); return(definition); }
public ScheduledJob(string id, ScheduledJobDefinition definition, DateTimeOffset?nextRun = null) { Id = id; Definition = definition; NextRun = nextRun; }