diff --git a/pkg/nuget/nuspec/Quartz.Impl.MongoDB.nuspec b/pkg/nuget/nuspec/Quartz.Impl.MongoDB.nuspec
index c0a14ca..b4eea7c 100644
--- a/pkg/nuget/nuspec/Quartz.Impl.MongoDB.nuspec
+++ b/pkg/nuget/nuspec/Quartz.Impl.MongoDB.nuspec
@@ -2,7 +2,7 @@
quartz.impl.mongodb
- 1.3
+ 1.4
Quartz.NET on MongoDB
Renaud Calmont
Renaud Calmont
@@ -14,8 +14,9 @@
en-US
nosql mongodb quartz scheduler
-
-
+
+
+
diff --git a/src/Quartz.Impl.MongoDB.Tests/App.config b/src/Quartz.Impl.MongoDB.Tests/App.config
index 1748af0..a1181d0 100644
--- a/src/Quartz.Impl.MongoDB.Tests/App.config
+++ b/src/Quartz.Impl.MongoDB.Tests/App.config
@@ -1,6 +1,15 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Quartz.Impl.MongoDB.Tests/Quartz.Impl.MongoDB.Tests.csproj b/src/Quartz.Impl.MongoDB.Tests/Quartz.Impl.MongoDB.Tests.csproj
index 21100e4..c6397ff 100644
--- a/src/Quartz.Impl.MongoDB.Tests/Quartz.Impl.MongoDB.Tests.csproj
+++ b/src/Quartz.Impl.MongoDB.Tests/Quartz.Impl.MongoDB.Tests.csproj
@@ -33,19 +33,23 @@
4
-
- False
- ..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll
+
+ ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll
+
+
+ ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll
- ..\packages\Machine.Specifications.0.5.10\lib\net40\Machine.Specifications.dll
+ ..\packages\Machine.Specifications.0.9.1\lib\net40\Machine.Specifications.dll
- ..\packages\Machine.Specifications.0.5.10\lib\net40\Machine.Specifications.Clr4.dll
+ ..\packages\Machine.Specifications.0.9.1\lib\net40\Machine.Specifications.Clr4.dll
+
+
+ ..\packages\Machine.Specifications.Should.0.7.2\lib\net40\Machine.Specifications.Should.dll
-
- False
- ..\packages\Quartz.2.1.2\lib\net40\Quartz.dll
+
+ ..\packages\Quartz.2.3.1\lib\net40\Quartz.dll
diff --git a/src/Quartz.Impl.MongoDB.Tests/job_scheduling_data_2_0.xsd b/src/Quartz.Impl.MongoDB.Tests/job_scheduling_data_2_0.xsd
new file mode 100644
index 0000000..d1dabc1
--- /dev/null
+++ b/src/Quartz.Impl.MongoDB.Tests/job_scheduling_data_2_0.xsd
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+ Root level node
+
+
+
+
+
+ Commands to be executed before scheduling the jobs and triggers in this file.
+
+
+
+
+ Directives to be followed while scheduling the jobs and triggers in this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Version of the XML Schema instance
+
+
+
+
+
+
+
+
+
+ Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.
+
+
+
+
+ Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.
+
+
+
+
+ Delete the identified job if it exists (will also result in deleting all triggers related to it).
+
+
+
+
+
+
+
+
+
+
+ Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.
+
+
+
+
+ If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.
+
+
+
+
+ If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.
+
+
+
+
+
+
+
+ Define a JobDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a JobDataMap
+
+
+
+
+
+
+
+
+ Define a JobDataMap entry
+
+
+
+
+
+
+
+
+
+ Define a Trigger
+
+
+
+
+
+
+
+
+
+
+ Common Trigger definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a SimpleTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a CronTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a DateIntervalTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cron expression (see JavaDoc for examples)
+
+ Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
+
+ Regular expressions are not my strong point but I believe this is complete,
+ with the caveat that order for expressions like 3-0 is not legal but will pass,
+ and month and day names must be capitalized.
+ If you want to examine the correctness look for the [\s] to denote the
+ seperation of individual regular expressions. This is how I break them up visually
+ to examine them:
+
+ SECONDS:
+ (
+ ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
+ | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ MINUTES:
+ (
+ ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
+ | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ HOURS:
+ (
+ ((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
+ | (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ DAY OF MONTH:
+ (
+ ((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
+ | (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
+ | (L(-[0-9])?)
+ | (L(-[1-2][0-9])?)
+ | (L(-[3][0-1])?)
+ | (LW)
+ | ([1-9]W)
+ | ([1-3][0-9]W)
+ | ([\?])
+ | ([\*])
+ )[\s]
+ MONTH:
+ (
+ ((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
+ | (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
+ | (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
+ | ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
+ | ([\?])
+ | ([\*])
+ )[\s]
+ DAY OF WEEK:
+ (
+ (([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
+ | ([1-7]/([1-7]))
+ | (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
+ | ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
+ | (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
+ | (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
+ | ([\?])
+ | ([\*])
+ )
+ YEAR (OPTIONAL):
+ (
+ [\s]?
+ ([\*])?
+ | ((19[7-9][0-9])|(20[0-9][0-9]))?
+ | (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
+ | ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
+ )
+
+
+
+
+
+
+
+
+
+ Number of times to repeat the Trigger (-1 for indefinite)
+
+
+
+
+
+
+
+
+
+ Simple Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cron Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+ Date Interval Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+ Interval Units
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Quartz.Impl.MongoDB.Tests/packages.config b/src/Quartz.Impl.MongoDB.Tests/packages.config
index 888d42b..50542ae 100644
--- a/src/Quartz.Impl.MongoDB.Tests/packages.config
+++ b/src/Quartz.Impl.MongoDB.Tests/packages.config
@@ -1,6 +1,8 @@
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Quartz.Impl.MongoDB/JobStore.cs b/src/Quartz.Impl.MongoDB/JobStore.cs
index 7dcfcd8..ab50102 100644
--- a/src/Quartz.Impl.MongoDB/JobStore.cs
+++ b/src/Quartz.Impl.MongoDB/JobStore.cs
@@ -362,7 +362,7 @@ public virtual void StoreJobAndTrigger(IJobDetail newJob, IOperableTrigger newTr
public virtual bool IsJobGroupPaused(string groupName)
{
var result = this.PausedJobGroups.FindOneByIdAs(groupName);
- return !result.IsBsonNull;
+ return result != null && !result.IsBsonNull;
}
///
@@ -373,7 +373,7 @@ public virtual bool IsJobGroupPaused(string groupName)
public virtual bool IsTriggerGroupPaused(string groupName)
{
var result = this.PausedTriggerGroups.FindOneByIdAs(groupName);
- return !result.IsBsonNull;
+ return result != null && !result.IsBsonNull;
}
///
@@ -829,6 +829,20 @@ public virtual void StoreCalendar(string name, ICalendar calendar, bool replaceE
}
}
+ ///
+ /// Determine whether a with the given identifier already
+ /// exists within the scheduler.
+ ///
+ /// calName the identifier to check for
+ /// true if a Calendar exists with the given identifier
+ public bool CalendarExists(string calName)
+ {
+ lock (lockObject)
+ {
+ return this.Calendars.FindOneByIdAs(calName) != null;
+ }
+ }
+
///
/// Remove (delete) the with the
/// given name.
diff --git a/src/Quartz.Impl.MongoDB/Properties/AssemblyInfo.cs b/src/Quartz.Impl.MongoDB/Properties/AssemblyInfo.cs
index c7b66de..b7ec275 100644
--- a/src/Quartz.Impl.MongoDB/Properties/AssemblyInfo.cs
+++ b/src/Quartz.Impl.MongoDB/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.2.0.0")]
-[assembly: AssemblyFileVersion("1.2.0.0")]
+[assembly: AssemblyVersion("1.4.0.0")]
+[assembly: AssemblyFileVersion("1.4.0.0")]
diff --git a/src/Quartz.Impl.MongoDB/Quartz.Impl.MongoDB.csproj b/src/Quartz.Impl.MongoDB/Quartz.Impl.MongoDB.csproj
index 6a13f94..abe723a 100644
--- a/src/Quartz.Impl.MongoDB/Quartz.Impl.MongoDB.csproj
+++ b/src/Quartz.Impl.MongoDB/Quartz.Impl.MongoDB.csproj
@@ -34,21 +34,23 @@
4
-
+
False
- ..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll
+ ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll
-
- False
- ..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Bson.dll
+
+ ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll
-
- False
- ..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Driver.dll
+
+ ..\packages\mongocsharpdriver.1.10.0\lib\net35\MongoDB.Bson.dll
+
+
+ ..\packages\mongocsharpdriver.1.10.0\lib\net35\MongoDB.Driver.dll
+ True
-
+
False
- ..\packages\Quartz.2.1.2\lib\net40\Quartz.dll
+ ..\packages\Quartz.2.3.1\lib\net40\Quartz.dll
diff --git a/src/Quartz.Impl.MongoDB/app.config b/src/Quartz.Impl.MongoDB/app.config
new file mode 100644
index 0000000..57ea164
--- /dev/null
+++ b/src/Quartz.Impl.MongoDB/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Quartz.Impl.MongoDB/job_scheduling_data_2_0.xsd b/src/Quartz.Impl.MongoDB/job_scheduling_data_2_0.xsd
new file mode 100644
index 0000000..d1dabc1
--- /dev/null
+++ b/src/Quartz.Impl.MongoDB/job_scheduling_data_2_0.xsd
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+ Root level node
+
+
+
+
+
+ Commands to be executed before scheduling the jobs and triggers in this file.
+
+
+
+
+ Directives to be followed while scheduling the jobs and triggers in this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Version of the XML Schema instance
+
+
+
+
+
+
+
+
+
+ Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.
+
+
+
+
+ Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.
+
+
+
+
+ Delete the identified job if it exists (will also result in deleting all triggers related to it).
+
+
+
+
+
+
+
+
+
+
+ Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.
+
+
+
+
+ If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.
+
+
+
+
+ If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.
+
+
+
+
+
+
+
+ Define a JobDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a JobDataMap
+
+
+
+
+
+
+
+
+ Define a JobDataMap entry
+
+
+
+
+
+
+
+
+
+ Define a Trigger
+
+
+
+
+
+
+
+
+
+
+ Common Trigger definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a SimpleTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a CronTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define a DateIntervalTrigger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cron expression (see JavaDoc for examples)
+
+ Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
+
+ Regular expressions are not my strong point but I believe this is complete,
+ with the caveat that order for expressions like 3-0 is not legal but will pass,
+ and month and day names must be capitalized.
+ If you want to examine the correctness look for the [\s] to denote the
+ seperation of individual regular expressions. This is how I break them up visually
+ to examine them:
+
+ SECONDS:
+ (
+ ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
+ | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ MINUTES:
+ (
+ ((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
+ | (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ HOURS:
+ (
+ ((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
+ | (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
+ | ([\?])
+ | ([\*])
+ ) [\s]
+ DAY OF MONTH:
+ (
+ ((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
+ | (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
+ | (L(-[0-9])?)
+ | (L(-[1-2][0-9])?)
+ | (L(-[3][0-1])?)
+ | (LW)
+ | ([1-9]W)
+ | ([1-3][0-9]W)
+ | ([\?])
+ | ([\*])
+ )[\s]
+ MONTH:
+ (
+ ((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
+ | (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
+ | (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
+ | ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
+ | ([\?])
+ | ([\*])
+ )[\s]
+ DAY OF WEEK:
+ (
+ (([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
+ | ([1-7]/([1-7]))
+ | (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
+ | ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
+ | (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
+ | (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
+ | ([\?])
+ | ([\*])
+ )
+ YEAR (OPTIONAL):
+ (
+ [\s]?
+ ([\*])?
+ | ((19[7-9][0-9])|(20[0-9][0-9]))?
+ | (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
+ | ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
+ )
+
+
+
+
+
+
+
+
+
+ Number of times to repeat the Trigger (-1 for indefinite)
+
+
+
+
+
+
+
+
+
+ Simple Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cron Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+ Date Interval Trigger Misfire Instructions
+
+
+
+
+
+
+
+
+
+
+ Interval Units
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Quartz.Impl.MongoDB/packages.config b/src/Quartz.Impl.MongoDB/packages.config
index 32450d1..8a8931f 100644
--- a/src/Quartz.Impl.MongoDB/packages.config
+++ b/src/Quartz.Impl.MongoDB/packages.config
@@ -1,6 +1,7 @@
-
-
-
+
+
+
+
\ No newline at end of file