这是我下面的代码,请不要发布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)
答案 0 :(得分:0)
您可以通过以下方式进行操作:
ITrigger myTrigger= TriggerBuilder.Create()
.StartNow()
.WithDailyTimeIntervalSchedule(
s => s.WithIntervalInHours(1)
.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(12, 30))
.InTimeZone(TimeZoneInfo.Utc))
.Build();