ravendb / quartznet-RavenDB

RavenDB JobStore support for Quartz.NET scheduler.
Apache License 2.0
27 stars 19 forks source link

Error loading daily time interval trigger #10

Closed georgiosd closed 2 years ago

georgiosd commented 8 years ago

Code:

                var timeOfDay = new TimeOfDay(11 - DateTimeOffset.UtcNow.Offset.Hours, 50);
                var trigger = TriggerBuilder.Create()
                    .WithDailyTimeIntervalSchedule(s => s.OnMondayThroughFriday().StartingDailyAt(timeOfDay))
                    .Build();

Error:

2016-08-17 11:49:52.1389|ERROR|Quartz.Core.QuartzSchedulerThread|quartzSchedulerThreadLoop: RuntimeException Could not convert document 60a166e2-99fd-4cd7-af54-19ce20ca3064/DEFAULT to entity of type Quartz.Impl.RavenDB.Trigger

Saved trigger:

{
    "Name": "60a166e2-99fd-4cd7-af54-19ce20ca3064",
    "Group": "DEFAULT",
    "Key": "60a166e2-99fd-4cd7-af54-19ce20ca3064/DEFAULT",
    "JobName": "ClearPatternTradeOrdersJob",
    "JobKey": "ClearPatternTradeOrdersJob/DEFAULT",
    "Scheduler": "BlackCatScheduler",
    "State": "Waiting",
    "Description": null,
    "CalendarName": null,
    "JobDataMap": {},
    "FireInstanceId": null,
    "MisfireInstruction": 0,
    "FinalFireTimeUtc": null,
    "EndTimeUtc": null,
    "StartTimeUtc": "2016-08-17T08:48:26.7887292+00:00",
    "NextFireTimeUtc": "2016-08-17T08:50:00.0000000+00:00",
    "NextFireTimeTicks": 636070206000000000,
    "PreviousFireTimeUtc": null,
    "Priority": 5,
    "HasMillisecondPrecision": true,
    "Cron": null,
    "Simp": null,
    "Cal": null,
    "Day": {
        "RepeatCount": -1,
        "RepeatIntervalUnit": "Minute",
        "RepeatInterval": 1,
        "StartTimeOfDay": {
            "Hour": 11,
            "Minute": 50,
            "Second": 0
        },
        "EndTimeOfDay": {
            "Hour": 23,
            "Minute": 59,
            "Second": 59
        },
        "DaysOfWeek": {
            "$type": "Quartz.Collection.HashSet`1[[System.DayOfWeek, mscorlib]], Quartz",
            "$values": [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday"
            ]
        },
        "TimesTriggered": 0,
        "TimeZoneId": "GTB Standard Time"
    }
}
iftahbe commented 8 years ago

@georgiosd I will try to fix this later this week

georgiosd commented 8 years ago

Thanks! I d help out but im on holiday right now :) On Sat, 20 Aug 2016 at 22:51, Iftah Ben Zaken notifications@github.com wrote:

@georgiosd https://github.com/georgiosd I will try to fix this later this week

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ravendb/quartznet-RavenDB/issues/10#issuecomment-241220142, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmDdhvrG_we4lvlakvtBK8UrAgwChM_ks5qh1qSgaJpZM4JmOoO .

iftahbe commented 8 years ago

Hi, I can't reproduce this. Do you use an old version of Quartz? I checked with both 2.3.3 and 2.4.1 and it works for me. Does the exception happen during recovery? If yes, try to manually delete the trigger/s and store them again. It happened to me once a while ago and when I deleted the database manually it was solved.

It would be great if you can post the stack trace...

georgiosd commented 8 years ago

I think it happened when the trigger was executed - could you check? If not i ll try again - on the road right now On Sat, 3 Sep 2016 at 13:19, Iftah Ben Zaken notifications@github.com wrote:

Hi, I can't reproduce this. Do you use an old version of Quartz? I checked with both 2.3.3 and 2.4.1 and it works for me. Does the exception happen during recovery? If yes, try to manually delete the trigger/s and store them again. It happened to me once a while ago and when I deleted the database manually it was solved.

It would be great if you can post the stack trace...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ravendb/quartznet-RavenDB/issues/10#issuecomment-244538695, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmDdrNvPRTp1TMwxaUdU2RLuHfJXKu7ks5qmUnKgaJpZM4JmOoO .