Skip to content

update to schedule def cron #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions api/src/main/resources/schema/cron/crondef.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "object",
"javaType": "io.serverlessworkflow.api.cron.Cron",
"description": "Schedule cron definition",
"properties": {
"expression": {
"type": "string",
"description": "Repeating interval (cron expression) describing when the workflow instance should be created"
},
"validUntil": {
"type": "string",
"description": "Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid"
}
},
"required": [
"expression"
]
}
4 changes: 2 additions & 2 deletions api/src/main/resources/schema/schedule/schedule.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"description": "Time interval (ISO 8601 format) describing when the workflow starting state is active"
},
"cron": {
"type": "string",
"description": "Repeating interval (cron expression) describing when the workflow starting state should be triggered"
"description": "Schedule cron definition",
"$ref": "../cron/crondef.json"
},
"directInvoke": {
"description": "Define if workflow instances can be created outside of the defined interval/cron",
Expand Down
4 changes: 3 additions & 1 deletion api/src/test/resources/examples/periodicinboxcheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"type": "operation",
"start": {
"schedule": {
"cron": "0 0/15 * * * ?"
"cron": {
"expression": "0 0/15 * * * ?"
}
}
},
"actionMode": "sequential",
Expand Down
3 changes: 2 additions & 1 deletion api/src/test/resources/examples/periodicinboxcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ states:
type: operation
start:
schedule:
cron: 0 0/15 * * * ?
cron:
expression: 0 0/15 * * * ?
actionMode: sequential
actions:
- functionRef:
Expand Down
4 changes: 3 additions & 1 deletion diagram/src/test/resources/examples/periodicinboxcheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"type": "operation",
"start": {
"schedule": {
"cron": "0 0/15 * * * ?"
"cron": {
"expression": "0 0/15 * * * ?"
}
}
},
"actionMode": "sequential",
Expand Down
3 changes: 2 additions & 1 deletion diagram/src/test/resources/examples/periodicinboxcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ states:
type: operation
start:
schedule:
cron: 0 0/15 * * * ?
cron:
expression: 0 0/15 * * * ?
actionMode: sequential
actions:
- functionRef:
Expand Down