Skip to content

Commit 59b01ed

Browse files
committed
scheduler documentation
dashjoin/dashjoin-aas#707
1 parent a6b3802 commit 59b01ed

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

dashjoin-docs/docs/developer-reference.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,42 @@ This sample data is used to edit the mapping.
10491049
Note that Receive always appends the new data like the Ignore mode in the ETL case. The difference is that there
10501050
is no expression that fetches data. Instead, the data is passed via the API call.
10511051

1052+
### Scheduling
1053+
1054+
Functions can be scheduled to run periodically. Using Dashjoin Studio, you can either set an interval or a cron schedule.
1055+
Use cron if your jobs should run based on a calendar, every weeknight at 2am, for instance. Use intervals for
1056+
simple schedules like: run every hour.
1057+
1058+
When a function is run by the scheduler, it uses the role "scheduler". Therefore, make sure that the function roles include this role.
1059+
Consider the following example that runs an invoke function every hour (note that the function is run without input parameter):
1060+
1061+
```
1062+
{
1063+
"ID": "interval",
1064+
"djClassName": "org.dashjoin.function.Invoke",
1065+
"expression": "...",
1066+
"every": "1h",
1067+
"roles": [
1068+
"scheduler"
1069+
]
1070+
}
1071+
```
1072+
1073+
Please refer to this [documentation](https://quarkus.io/guides/scheduler-reference#intervals) for information about the interval string format.
1074+
The next example uses the [cron](https://quarkus.io/guides/scheduler-reference#cron) syntax to run the function every day at 10:15:
1075+
1076+
```
1077+
{
1078+
"ID": "interval",
1079+
"djClassName": "org.dashjoin.function.Invoke",
1080+
"expression": "...",
1081+
"cron": "0 15 10 * * ?",
1082+
"roles": [
1083+
"scheduler"
1084+
]
1085+
}
1086+
```
1087+
10521088
## Dashjoin Expression Reference
10531089

10541090
In addition to the default JSONata built-in functions ([see Function Library](https://docs.jsonata.org/overview.html)), the following Dashjoin functions are added

0 commit comments

Comments
 (0)