Skip to content
65 changes: 65 additions & 0 deletions definitions/cron/data_type/object/cron_code.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"variant": "OBJECT",
"identifier": "CRON_CODE",
"name": [
{
"code": "en-US",
"content": "Cron Code"
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Code ${minute} ${hour} ${day_of_month} ${month} ${day_of_week}"
}
],
"rules": [
{
"containsKey": {
"key": "minute",
"dataTypeIdentifier": {
"dataTypeIdentifier": "CRON_MINUTE"
}
}
},
{
"containsKey": {
"key": "hour",
"dataTypeIdentifier": {
"dataTypeIdentifier": "CRON_HOUR"
}
}
},
{
"containsKey": {
"key": "day_of_month",
"dataTypeIdentifier": {
"dataTypeIdentifier": "CRON_DAY_OF_MONTH"
}
}
},
{
"containsKey": {
"key": "month",
"dataTypeIdentifier": {
"dataTypeIdentifier": "CRON_MONTH"
}
}
},
{
"containsKey": {
"key": "day_of_week",
"dataTypeIdentifier": {
"dataTypeIdentifier": "CRON_DAY_OF_WEEK"
}
}
}
],
"genericKeys": []
}
30 changes: 30 additions & 0 deletions definitions/cron/data_type/type/cron_day_of_month.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variant": "TYPE",
"identifier": "CRON_DAY_OF_MONTH",
"name": [
{
"code": "en-US",
"content": "Cron Day of Month"
}
],
"rules": [
{
"regex": {
"pattern": "^(\\*|([1-9]|[12]\\d|3[01])(-([1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?(,(\\*|([1-9]|[12]\\d|3[01])(-([1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?)*$"
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern for CRON_DAY_OF_MONTH doesn't accept leading zeros (e.g., "01", "02"), which creates an inconsistency with the other cron field types (minute, hour, month) that do accept leading zeros. Standard cron expressions typically accept both "1" and "01" formats. Consider updating the pattern to: ^(\\*|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?(,(\\*|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?)*$ to allow optional leading zeros for day values (but not for step values, as they represent counts rather than specific days).

Suggested change
"pattern": "^(\\*|([1-9]|[12]\\d|3[01])(-([1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?(,(\\*|([1-9]|[12]\\d|3[01])(-([1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?)*$"
"pattern": "^(\\*|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?(,(\\*|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01]))?)(\\/([1-9]|[12]\\d|3[01]))?)*$"

Copilot uses AI. Check for mistakes.
}
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;month;day"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Day of Month"
}
],
"genericKeys": []
}
30 changes: 30 additions & 0 deletions definitions/cron/data_type/type/cron_day_of_week.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variant": "TYPE",
"identifier": "CRON_DAY_OF_WEEK",
"name": [
{
"code": "en-US",
"content": "Cron Day of Week"
}
],
"rules": [
{
"regex": {
"pattern": "^(\\*|([0-7])(-([0-7]))?)(\\/([0-7]))?(,(\\*|([0-7])(-([0-7]))?)(\\/([0-7]))?)*$"
}
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;day;week"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Day of Week"
}
],
"genericKeys": []
}
30 changes: 30 additions & 0 deletions definitions/cron/data_type/type/cron_hour.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variant": "TYPE",
"identifier": "CRON_HOUR",
"name": [
{
"code": "en-US",
"content": "Cron Hour"
}
],
"rules": [
{
"regex": {
"pattern": "^(\\*|([01]?\\d|2[0-3])(-([01]?\\d|2[0-3]))?)(\\/([01]?\\d|2[0-3]))?(,(\\*|([01]?\\d|2[0-3])(-([01]?\\d|2[0-3]))?)(\\/([01]?\\d|2[0-3]))?)*$"
}
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;hour"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Hour"
}
],
"genericKeys": []
}
30 changes: 30 additions & 0 deletions definitions/cron/data_type/type/cron_minute.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variant": "TYPE",
"identifier": "CRON_MINUTE",
"name": [
{
"code": "en-US",
"content": "Cron Minute"
}
],
"rules": [
{
"regex": {
"pattern": "^(\\*|([0-5]?\\d)(-[0-5]?\\d)?)(\\/[0-5]?\\d)?(,(\\*|([0-5]?\\d)(-[0-5]?\\d)?)(\\/[0-5]?\\d)?)*$"
}
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;minute"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Minute"
}
],
"genericKeys": []
}
30 changes: 30 additions & 0 deletions definitions/cron/data_type/type/cron_month.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variant": "TYPE",
"identifier": "CRON_MONTH",
"name": [
{
"code": "en-US",
"content": "Cron Month"
}
],
"rules": [
{
"regex": {
"pattern": "^(\\*|(0?[1-9]|1[0-2])(-(0?[1-9]|1[0-2]))?)(\\/(0?[1-9]|1[0-2]))?(,(\\*|(0?[1-9]|1[0-2])(-(0?[1-9]|1[0-2]))?)(\\/(0?[1-9]|1[0-2]))?)*$"
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern doesn't accept leading zeros for month values, which are valid in cron expressions. For example, "01" (January with leading zero) should be valid but will be rejected by this pattern. Consider updating the pattern to allow optional leading zeros, similar to how the minute and hour patterns handle them.

Copilot uses AI. Check for mistakes.
}
}
],
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;month"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Cron Month"
}
],
"genericKeys": []
}
49 changes: 49 additions & 0 deletions definitions/cron/flow_type/cron.proto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"identifier": "CRON",
"settings": [
{
"identifier": "CRON_CODE",
"unique": "NONE",
"dataTypeIdentifier": "CRON_CODE",
"defaultValue": null,
"name": [
{
"code": "en-US",
"content": "Cron Code"
}
],
"description": [
{
"code": "en-US",
"content": "Specifies the Cron Code for this flow to be called."
}
]
}
],
"name": [
{
"code": "en-US",
"content": "Cron Job"
}
],
"description": [
{
"code": "en-US",
"content": "A Cron Job is a scheduled task that runs automatically at specified intervals, typically defined using cron expressions. It is commonly used to automate repetitive operations such as data processing, system maintenance, and periodic updates without requiring manual execution."
}
],
"documentation": [],
"displayIcon": "tabler:file-time",
"alias": [
{
"code": "en-US",
"content": "cron;code;schedule;timer;clock;flow"
}
],
"displayMessage": [
{
"code": "en-US",
"content": "Schedule Job ${cron_code}"
}
]
}