1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "expression": "*/5 * * * *",
10 "expressions": """*/5 * * * *
110 9 * * 1-5
120 0 1 * *
130 0 * * 0
1430 4 * * 1-5""",
15 "batchData": [
16 {
17 "id": "job-alpha",
18 "expression": "*/5 * * * *",
19 "label": "Health Check",
20 },
21 {
22 "id": "job-beta",
23 "expression": "0 9 * * 1-5",
24 "label": "Daily Report",
25 },
26 {
27 "id": "job-gamma",
28 "expression": "0 0 1 * *",
29 "label": "Monthly Archive",
30 },
31 ],
32}
33
34
35run = client.actor("perryay/cron-expression-builder-validator").call(run_input=run_input)
36
37
38print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
39for item in client.dataset(run["defaultDatasetId"]).iterate_items():
40 print(item)
41
42