Cron Connector
Overview
Section titled “Overview”The Cron connector schedules data release based on cron expressions.
Connector Type: MeddleCron
Default Mode
Section titled “Default Mode”Release all accumulated data at scheduled times:
{ "type": "MeddleCron", "config": { "mode": "Default", "expression": "0 */5 * * * *", "maxRetained": 100, "timezone": "Europe/Rome" }}Unique Key Mode
Section titled “Unique Key Mode”Deduplicate data by key before release:
{ "type": "MeddleCron", "config": { "mode": "UniqueKey", "expression": "0 0 * * * *", "uniqueKey": "sensor_id", "maxRetained": 1000 }}Unique Key Keep Missing Mode
Section titled “Unique Key Keep Missing Mode”Deduplicate but keep records without the unique key:
{ "type": "MeddleCron", "config": { "mode": "UniqueKeyKeepMissing", "expression": "0 30 * * * *", "uniqueKey": "device_id", "maxRetained": 500 }}Cron Expression Format
Section titled “Cron Expression Format”Format: second minute hour day month weekday
Common Expressions
Section titled “Common Expressions”0 */5 * * * * Every 5 minutes0 0 * * * * Every hour0 0 0 * * * Every day at midnight0 30 9 * * 1-5 At 9:30 AM on weekdays0 0 12 * * 0 At noon on Sundays0 0 */6 * * * Every 6 hours0 15 10 * * * At 10:15 AM every dayField Values
Section titled “Field Values”- Second: 0-59
- Minute: 0-59
- Hour: 0-23
- Day: 1-31
- Month: 1-12
- Weekday: 0-6 (0 = Sunday)
Special Characters
Section titled “Special Characters”*- Any value*/n- Every n unitsn-m- Range from n to mn,m- Specific values
Configuration Parameters
Section titled “Configuration Parameters”- mode:
Default,UniqueKey, orUniqueKeyKeepMissing - expression: Cron expression
- maxRetained: Maximum payloads to retain in memory
- timezone: Timezone for scheduling (e.g., “Europe/Rome”, “America/New_York”)
- uniqueKey: (UniqueKey modes) Field to use for deduplication
Use Cases
Section titled “Use Cases”1. Hourly Reports
Section titled “1. Hourly Reports”{ "type": "MeddleCron", "config": { "mode": "Default", "expression": "0 0 * * * *", "maxRetained": 1000, "timezone": "UTC" }}2. Daily Batch Processing
Section titled “2. Daily Batch Processing”{ "type": "MeddleCron", "config": { "mode": "UniqueKey", "expression": "0 0 0 * * *", "uniqueKey": "machine_id", "maxRetained": 5000 }}3. Business Hours Only
Section titled “3. Business Hours Only”{ "type": "MeddleCron", "config": { "mode": "Default", "expression": "0 0 9-17 * * 1-5", "maxRetained": 500, "timezone": "Europe/Rome" }}Best Practices
Section titled “Best Practices”- Set
maxRetainedto prevent memory issues - Use
UniqueKeymode to avoid duplicate data - Choose appropriate timezone for your use case
- Test expressions with online cron calculators