如何不使用CronSchedule设置石英的时间表的时区

时间:2018-11-17 17:04:13

标签: c# .net quartz

这是我下面的代码,请不要发布WithCronScheduler的答案,因为我知道如何使用它,我的用例特定于下面

try:
    data = json.loads(jsonfile)
except json.decoder.JSONDecodeError as e:
    print("Malformed JSON data, can't decode", e)
else:
    try:
        for entry in data["result"]["malware"].values():
            print("Malware:", entry["malware"])
            print("File:", entry["file"])
    except (AttributeError, IndexError, TypeError, KeyError) as e
        print("Unexpected data structure from the JSON file", e)

1 个答案:

答案 0 :(得分:0)

您可以通过以下方式进行操作:

ITrigger myTrigger= TriggerBuilder.Create()
                .StartNow()
                .WithDailyTimeIntervalSchedule(
                    s => s.WithIntervalInHours(1)
                        .StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(12, 30))
                        .InTimeZone(TimeZoneInfo.Utc))
                .Build();
相关问题