(tried docker otter:3.0.14-ci.1) Situation: I want to schedule a job for detect and remediate drift every hour.
Jobs\Upcoming & Recurring\Create Recurring Job\Remediate Drift on Recurring Basis:
- Schedule: Custom
- Run at time: 0 0 * ? * * *
- [Create Job]
.1. Description: "Invalid chron expression:".
-
LogMessage:
Logged:
11/04/2021 13:00:39
Level:
Error
Category:
RecurringJobDispatcherRunner
Message:
Unhandled exception: cronExpression cannot be null
Details:
System.ArgumentException: cronExpression cannot be null
at Quartz.CronExpression..ctor(String cronExpression)
at Inedo.Otter.Service.TaskRunners.RecurringJobDispatcherRunner.GetNextRunTime(DateTimeOffset expectedNow, JobConfiguration jobConfig) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E156460\Src\src\Otter.Service\TaskRunners\RecurringJobDispatcherRunner.cs:line 78
at Inedo.Otter.Service.TaskRunners.RecurringJobDispatcherRunner.RunAsync(CancellationToken cancellationToken, Object args) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E156460\Src\src\Otter.Service\TaskRunners\RecurringJobDispatcherRunner.cs:line 47
at Inedo.TaskRunner.RunInternalAsync(Object args) -
Value (of field Job_Configuration record in table Jobs) wo "CronSchedule":
<Inedo.Otter.Jobs.JobConfiguration Assembly="OtterCoreEx"><Properties JobType="Configuration" ServerTargeting="RolesAndEnvironment" Simulation="False" Async="True"><ServerNames /><ServerRoleNames><Item>agent</Item></ServerRoleNames><EnvironmentNames /><Variables /></Properties></Inedo.Otter.Jobs.JobConfiguration> -
If edit-recurring job:
- Schedule: "Every day"
- Run at time: (blank)
-
Equally for "Run Script on Recurring Basis".
-
Workaround:
- Create with Schedule: "Every day";
- Update sql-record in table Jobs with CronSchedule "0 0 * ? * * *".
.2. Edit-recurring (RemediateDrift Job) - "Script is required".