@clairejs/server 3.27.0 → 3.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/job/AwsJobScheduler.js +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,19 +42,19 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
|
|
|
42
42
|
}
|
|
43
43
|
convertCronToSchedulerExpression(cron) {
|
|
44
44
|
// AWS Scheduler uses a different cron format than standard cron
|
|
45
|
-
// Standard cron: minute hour day month day-of-week
|
|
46
|
-
// AWS Scheduler: minute hour day month day-of-week year
|
|
47
45
|
const parts = cron.split(" ");
|
|
48
46
|
if (parts.length === 5) {
|
|
49
|
-
//
|
|
50
|
-
|
|
47
|
+
// Standard cron: minute hour day month day-of-week
|
|
48
|
+
// AWS Scheduler: minute hour day month day-of-week year
|
|
49
|
+
parts.push("*");
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
return cron;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
51
|
+
if (parts.length !== 6) {
|
|
56
52
|
throw Errors.SYSTEM_ERROR(`Invalid cron expression: ${cron}`);
|
|
57
53
|
}
|
|
54
|
+
if (parts[4] === "*") {
|
|
55
|
+
parts[4] = "?";
|
|
56
|
+
}
|
|
57
|
+
return parts.join(" ");
|
|
58
58
|
}
|
|
59
59
|
async cleanupJob(job) {
|
|
60
60
|
if (job.at) {
|