opened
jakolars
username_0
We have an issue with our nightly triggers running duplicate full syncs. 
When we have one full sync triggered it runs 2 times.
Example of trigger where this is happening: 
![bilde](https://user-images.githubusercontent.com/3500014/47338823-93094a00-d699-11e8-9c99-094933bccb69.png)

This is naturaly making our nightly runs very ineffective.
Triggered Full sync runs multiple times.
issue
created
jakolars
username_0
@username_1 i have now sent the Logs to your email.
comment
created
ryannewington
username_1
@username_0 Thanks for sending through the logs.

I have an idea of what is going on here. It's an interesting problem.

When the trigger is first registered, it works out the exact number of milliseconds until 5:00:00am. The trigger wakes up at that time, and fires off the job. Then it has to work out the number of milliseconds until the next time 5:00:00am occurs.

You will notice that the trigger actually fires at  4:59:59. What seems to have happened, is that your system clock has been 'corrected' back by a small amount. This is usually by the virtual machine guest integration tools, or the AD time sync protocol. This is totally normal, because computer clocks do drift. 

The problem it causes for us is that the trigger then has to work out when to fire next, so it's trying to work out "when is the next 5:00:00am", which happens to be only a few hundred milliseconds away by this point, so you get the trigger fired again.

This is a problem with autosync's scheduling logic. I'll need to look at another way to do this.
comment
created
ryannewington
username_1
@username_0 

Here is a build to test with and see if it resolves your issue.

[autosync.zip](https://github.com/lithnet/miis-autosync/files/2509962/autosync.zip)

@username_2 we'll need to deploy and test in our environment as well before an official release.
comment
closed
ryannewington
username_1
issue
created
jakolars
username_0
@username_1 wow, great speed!
Thank you so much, will test the new build today.
comment
created
Manjunath-hk1
username_2
Thanks Ryan, Build has been deployed to developed. Initial run looks good. I will report if any issue.
comment
created
ryannewington
username_1
@username_0 has this solve the issue for you?
comment
created
jakolars
username_0
Hi,
we've have had it running for a week now. And it seems to work properly.  No problems.  Thanks so much for the quick fix.
comment