Scheduling Examples
Real-world examples of job scheduling patterns for common use cases.
Notification & Communication
Welcome Email Series
Schedule a series of onboarding emails for new users:
- TypeScript
- Java
- Go
- .NET
async function scheduleWelcomeEmailSeries(userId: string, email: string) {
// Email 1: Welcome (immediate)
await ductape.notifications.dispatch({
notification: 'user-emails',
event: 'welcome',
input: {
email: {
recipients: [email],
template: { userId, email }
}
},
retries: 3
});
// Email 2: Getting started (24 hours)
await ductape.notifications.dispatch({
notification: 'user-emails',
event: 'getting_started',
input: {
email: {
recipients: [email],
template: { userId }
}
},
retries: 3,
schedule: {
start_at: Date.now() + 24 * 60 * 60 * 1000
}
});
// Email 3: Tips & tricks (3 days)
await ductape.notifications.dispatch({
notification: 'user-emails',
event: 'tips_and_tricks',
input: {
email: {
recipients: [email],
template: { userId }
}
},
retries: 3,
schedule: {
start_at: Date.now() + 3 * 24 * 60 * 60 * 1000
}
});
// Email 4: Feature highlights (7 days)
await ductape.notifications.dispatch({
notification: 'user-emails',
event: 'feature_highlights',
input: {
email: {
recipients: [email],
template: { userId }
}
},
retries: 3,
schedule: {
start_at: Date.now() + 7 * 24 * 60 * 60 * 1000
}
});
}
async function scheduleWelcomeEmailSeries(userId: string, email: string) Map.of(
// Email 1: Welcome (immediate)
ductape.notifications.dispatch(Map.of(
"notification", "user-emails",
"event", "welcome",
input: Map.of(
email: Map.of(
recipients: [email],
template: Map.of( userId, email )
)
),
"retries", 3
));
// Email 2: Getting started (24 hours)
ductape.notifications.dispatch(Map.of(
"notification", "user-emails",
"event", "getting_started",
input: Map.of(
email: Map.of(
recipients: [email],
template: Map.of( userId )
)
),
"retries", 3,
schedule: Map.of(
start_at: Date.now() + 24 * 60 * 60 * 1000
)
));
// Email 3: Tips & tricks (3 days)
ductape.notifications.dispatch(Map.of(
"notification", "user-emails",
"event", "tips_and_tricks",
input: Map.of(
email: Map.of(
recipients: [email],
template: Map.of( userId )
)
),
"retries", 3,
schedule: Map.of(
start_at: Date.now() + 3 * 24 * 60 * 60 * 1000
)
));
// Email 4: Feature highlights (7 days)
ductape.notifications.dispatch(Map.of(
"notification", "user-emails",
"event", "feature_highlights",
input: Map.of(
email: Map.of(
recipients: [email],
template: Map.of( userId )
)
),
"retries", 3,
schedule: Map.of(
start_at: Date.now() + 7 * 24 * 60 * 60 * 1000
)
));
)
async function scheduleWelcomeEmailSeries(userId: string, email: string) {
// Email 1: Welcome (immediate)
client.notifications.dispatch({
"notification": "user-emails",
"event": "welcome",
input: {
email: {
recipients: [email],
template: { userId, email }
}
},
"retries": 3
});
// Email 2: Getting started (24 hours)
client.notifications.dispatch({
"notification": "user-emails",
"event": "getting_started",
input: {
email: {
recipients: [email],
template: { userId }
}
},
"retries": 3,
schedule: {
start_at: Date.now() + 24 * 60 * 60 * 1000
}
});
// Email 3: Tips & tricks (3 days)
client.notifications.dispatch({
"notification": "user-emails",
"event": "tips_and_tricks",
input: {
email: {
recipients: [email],
template: { userId }
}
},
"retries": 3,
schedule: {
start_at: Date.now() + 3 * 24 * 60 * 60 * 1000
}
});
// Email 4: Feature highlights (7 days)
client.notifications.dispatch({
"notification": "user-emails",
"event": "feature_highlights",
input: {
email: {
recipients: [email],
template: { userId }
}
},
"retries": 3,
schedule: {
start_at: Date.now() + 7 * 24 * 60 * 60 * 1000
}
});
}
async function scheduleWelcomeEmailSeries(userId: string, email: string) {
// Email 1: Welcome (immediate)
await ductape.notifications.dispatch({
["notification"] = "user-emails",
["event"] = "welcome",
input: {
email: {
recipients: [email],
template: { userId, email }
}
},
["retries"] = 3
});
// Email 2: Getting started (24 hours)
await ductape.notifications.dispatch({
["notification"] = "user-emails",
["event"] = "getting_started",
input: {
email: {
recipients: [email],
template: { userId }
}
},
["retries"] = 3,
schedule: {
start_at: Date.now() + 24 * 60 * 60 * 1000
}
});
// Email 3: Tips & tricks (3 days)
await ductape.notifications.dispatch({
["notification"] = "user-emails",
["event"] = "tips_and_tricks",
input: {
email: {
recipients: [email],
template: { userId }
}
},
["retries"] = 3,
schedule: {
start_at: Date.now() + 3 * 24 * 60 * 60 * 1000
}
});
// Email 4: Feature highlights (7 days)
await ductape.notifications.dispatch({
["notification"] = "user-emails",
["event"] = "feature_highlights",
input: {
email: {
recipients: [email],
template: { userId }
}
},
["retries"] = 3,
schedule: {
start_at: Date.now() + 7 * 24 * 60 * 60 * 1000
}
});
}
Daily Digest Emails
Send daily digest at user's preferred time:
- TypeScript
- Java
- Go
- .NET
async function scheduleDailyDigest(userId: string, email: string, preferredHour: number, timezone: string) {
await ductape.notifications.dispatch({
notification: 'digest-emails',
event: 'daily_digest',
input: {
email: {
recipients: [email],
template: { userId, date: '$Format($Now(), "MMMM D, YYYY")' }
}
},
retries: 2,
schedule: {
cron: `0 ${preferredHour} * * *`,
tz: timezone
}
});
}
// Schedule for user at 8 AM in their timezone
await scheduleDailyDigest('user_123', 'user@example.com', 8, 'America/New_York');
async function scheduleDailyDigest(userId: string, email: string, preferredHour: number, timezone: string) Map.of(
ductape.notifications.dispatch(Map.of(
"notification", "digest-emails",
"event", "daily_digest",
input: Map.of(
email: Map.of(
recipients: [email],
template: Map.of( userId, "date", "$Format($Now(), "MMMM D, YYYY")" )
)
),
"retries", 2,
schedule: Map.of(
cron: `0 $Map.of(preferredHour) * * *`,
tz: timezone
)
));
)
// Schedule for user at 8 AM in their timezone
scheduleDailyDigest('user_123', 'user@example.com', 8, 'America/New_York');
async function scheduleDailyDigest(userId: string, email: string, preferredHour: number, timezone: string) {
client.notifications.dispatch({
"notification": "digest-emails",
"event": "daily_digest",
input: {
email: {
recipients: [email],
template: { userId, "date": "$Format($Now(), "MMMM D, YYYY")" }
}
},
"retries": 2,
schedule: {
cron: `0 ${preferredHour} * * *`,
tz: timezone
}
});
}
// Schedule for user at 8 AM in their timezone
scheduleDailyDigest('user_123', 'user@example.com', 8, 'America/New_York');
async function scheduleDailyDigest(userId: string, email: string, preferredHour: number, timezone: string) {
await ductape.notifications.dispatch({
["notification"] = "digest-emails",
["event"] = "daily_digest",
input: {
email: {
recipients: [email],
template: { userId, ["date"] = "$Format($Now(), "MMMM D, YYYY")" }
}
},
["retries"] = 2,
schedule: {
cron: `0 ${preferredHour} * * *`,
tz: timezone
}
});
}
// Schedule for user at 8 AM in their timezone
await scheduleDailyDigest('user_123', 'user@example.com', 8, 'America/New_York');
Reminder Notifications
Send reminders before an event:
- TypeScript
- Java
- Go
- .NET
async function scheduleEventReminders(eventId: string, eventTime: number, userId: string, deviceToken: string) {
// 24 hour reminder
await ductape.notifications.dispatch({
notification: 'push-notifications',
event: 'event_reminder',
input: {
push_notification: {
device_tokens: [deviceToken],
title: { text: 'Event Tomorrow!' },
body: { text: 'Your event starts in 24 hours' },
data: { eventId }
}
},
retries: 2,
schedule: {
start_at: eventTime - 24 * 60 * 60 * 1000
}
});
// 1 hour reminder
await ductape.notifications.dispatch({
notification: 'push-notifications',
event: 'event_reminder',
input: {
push_notification: {
device_tokens: [deviceToken],
title: { text: 'Event Starting Soon!' },
body: { text: 'Your event starts in 1 hour' },
data: { eventId }
}
},
retries: 2,
schedule: {
start_at: eventTime - 60 * 60 * 1000
}
});
}
async function scheduleEventReminders(eventId: string, eventTime: number, userId: string, deviceToken: string) Map.of(
// 24 hour reminder
ductape.notifications.dispatch(Map.of(
"notification", "push-notifications",
"event", "event_reminder",
input: Map.of(
push_notification: Map.of(
device_tokens: [deviceToken],
title: Map.of( "text", "Event Tomorrow!" ),
body: Map.of( "text", "Your event starts in 24 hours" ),
data: Map.of( eventId )
)
),
"retries", 2,
schedule: Map.of(
start_at: eventTime - 24 * 60 * 60 * 1000
)
));
// 1 hour reminder
ductape.notifications.dispatch(Map.of(
"notification", "push-notifications",
"event", "event_reminder",
input: Map.of(
push_notification: Map.of(
device_tokens: [deviceToken],
title: Map.of( "text", "Event Starting Soon!" ),
body: Map.of( "text", "Your event starts in 1 hour" ),
data: Map.of( eventId )
)
),
"retries", 2,
schedule: Map.of(
start_at: eventTime - 60 * 60 * 1000
)
));
)
async function scheduleEventReminders(eventId: string, eventTime: number, userId: string, deviceToken: string) {
// 24 hour reminder
client.notifications.dispatch({
"notification": "push-notifications",
"event": "event_reminder",
input: {
push_notification: {
device_tokens: [deviceToken],
title: { "text": "Event Tomorrow!" },
body: { "text": "Your event starts in 24 hours" },
data: { eventId }
}
},
"retries": 2,
schedule: {
start_at: eventTime - 24 * 60 * 60 * 1000
}
});
// 1 hour reminder
client.notifications.dispatch({
"notification": "push-notifications",
"event": "event_reminder",
input: {
push_notification: {
device_tokens: [deviceToken],
title: { "text": "Event Starting Soon!" },
body: { "text": "Your event starts in 1 hour" },
data: { eventId }
}
},
"retries": 2,
schedule: {
start_at: eventTime - 60 * 60 * 1000
}
});
}
async function scheduleEventReminders(eventId: string, eventTime: number, userId: string, deviceToken: string) {
// 24 hour reminder
await ductape.notifications.dispatch({
["notification"] = "push-notifications",
["event"] = "event_reminder",
input: {
push_notification: {
device_tokens: [deviceToken],
title: { ["text"] = "Event Tomorrow!" },
body: { ["text"] = "Your event starts in 24 hours" },
data: { eventId }
}
},
["retries"] = 2,
schedule: {
start_at: eventTime - 24 * 60 * 60 * 1000
}
});
// 1 hour reminder
await ductape.notifications.dispatch({
["notification"] = "push-notifications",
["event"] = "event_reminder",
input: {
push_notification: {
device_tokens: [deviceToken],
title: { ["text"] = "Event Starting Soon!" },
body: { ["text"] = "Your event starts in 1 hour" },
data: { eventId }
}
},
["retries"] = 2,
schedule: {
start_at: eventTime - 60 * 60 * 1000
}
});
}
Data Processing
Daily Report Generation
Generate reports every business day:
- TypeScript
- Java
- Go
- .NET
// Generate sales report at 6 AM on weekdays
const salesReport = await ductape.features.dispatch({
feature: 'generate_sales_report',
input: {
reportType: 'daily',
format: 'pdf',
recipients: ['sales@company.com', 'management@company.com']
},
retries: 3,
schedule: {
cron: '0 6 * * 1-5', // 6 AM, Mon-Fri
tz: 'America/New_York'
}
});
// Generate sales report at 6 AM on weekdays
Map<String, Object> salesReport = ductape.features.dispatch(Map.of(
"feature", "generate_sales_report",
input: Map.of(
"reportType", "daily",
"format", "pdf",
recipients: ['sales@company.com', 'management@company.com']
),
"retries", 3,
schedule: Map.of(
"cron", "0 6 * * 1-5", // 6 AM, Mon-Fri
"tz", "America/New_York"
)
));
// Generate sales report at 6 AM on weekdays
salesReport := client.features.dispatch({
"feature": "generate_sales_report",
input: {
"reportType": "daily",
"format": "pdf",
recipients: ['sales@company.com', 'management@company.com']
},
"retries": 3,
schedule: {
"cron": "0 6 * * 1-5", // 6 AM, Mon-Fri
"tz": "America/New_York"
}
});
// Generate sales report at 6 AM on weekdays
var salesReport = await ductape.features.dispatch({
["feature"] = "generate_sales_report",
input: {
["reportType"] = "daily",
["format"] = "pdf",
recipients: ['sales@company.com', 'management@company.com']
},
["retries"] = 3,
schedule: {
["cron"] = "0 6 * * 1-5", // 6 AM, Mon-Fri
["tz"] = "America/New_York"
}
});
Weekly Analytics
Generate weekly summary every Monday:
- TypeScript
- Java
- Go
- .NET
const weeklyAnalytics = await ductape.features.dispatch({
feature: 'generate_weekly_summary',
input: {
reportType: 'weekly',
includeCharts: true,
compareLastWeek: true
},
retries: 3,
schedule: {
cron: '0 9 * * 1', // 9 AM every Monday
tz: 'America/New_York'
}
});
Map<String, Object> weeklyAnalytics = ductape.features.dispatch(Map.of(
"feature", "generate_weekly_summary",
input: Map.of(
"reportType", "weekly",
"includeCharts", true,
"compareLastWeek", true
),
"retries", 3,
schedule: Map.of(
"cron", "0 9 * * 1", // 9 AM every Monday
"tz", "America/New_York"
)
));
weeklyAnalytics := client.features.dispatch({
"feature": "generate_weekly_summary",
input: {
"reportType": "weekly",
"includeCharts": true,
"compareLastWeek": true
},
"retries": 3,
schedule: {
"cron": "0 9 * * 1", // 9 AM every Monday
"tz": "America/New_York"
}
});
var weeklyAnalytics = await ductape.features.dispatch({
["feature"] = "generate_weekly_summary",
input: {
["reportType"] = "weekly",
["includeCharts"] = true,
["compareLastWeek"] = true
},
["retries"] = 3,
schedule: {
["cron"] = "0 9 * * 1", // 9 AM every Monday
["tz"] = "America/New_York"
}
});
Data Export
Schedule nightly data export:
- TypeScript
- Java
- Go
- .NET
const dataExport = await ductape.database.dispatch({
database: 'analytics-db',
operation: 'insert',
input: {
table: 'export_jobs',
data: {
export_date: '$Format($DateAdd($Now(), -1, "days"), "YYYY-MM-DD")',
destination: 's3://data-warehouse/daily-exports/',
status: 'pending'
}
},
retries: 5,
schedule: {
cron: '0 2 * * *', // 2 AM daily
tz: 'UTC'
}
});
Map<String, Object> dataExport = ductape.database.dispatch(Map.of(
"database", "analytics-db",
"operation", "insert",
input: Map.of(
"table", "export_jobs",
data: Map.of(
"export_date", "$Format($DateAdd($Now(), -1, "days"), "YYYY-MM-DD")",
"destination", "s3://data-warehouse/daily-exports/",
"status", "pending"
)
),
"retries", 5,
schedule: Map.of(
"cron", "0 2 * * *", // 2 AM daily
"tz", "UTC"
)
));
dataExport := client.database.dispatch({
"database": "analytics-db",
"operation": "insert",
input: {
"table": "export_jobs",
data: {
"export_date": "$Format($DateAdd($Now(), -1, "days"), "YYYY-MM-DD")",
"destination": "s3://data-warehouse/daily-exports/",
"status": "pending"
}
},
"retries": 5,
schedule: {
"cron": "0 2 * * *", // 2 AM daily
"tz": "UTC"
}
});
var dataExport = await ductape.database.dispatch({
["database"] = "analytics-db",
["operation"] = "insert",
input: {
["table"] = "export_jobs",
data: {
["export_date"] = "$Format($DateAdd($Now(), -1, "days"), "YYYY-MM-DD")",
["destination"] = "s3://data-warehouse/daily-exports/",
["status"] = "pending"
}
},
["retries"] = 5,
schedule: {
["cron"] = "0 2 * * *", // 2 AM daily
["tz"] = "UTC"
}
});
Maintenance & Cleanup
Session Cleanup
Clean up expired sessions hourly:
- TypeScript
- Java
- Go
- .NET
const sessionCleanup = await ductape.database.dispatch({
database: 'sessions-db',
operation: 'delete',
input: {
table: 'sessions',
where: {
expires_at: { $LT: '$Now()' }
}
},
retries: 2,
schedule: {
cron: '0 * * * *' // Every hour
}
});
Map<String, Object> sessionCleanup = ductape.database.dispatch(Map.of(
"database", "sessions-db",
"operation", "delete",
input: Map.of(
"table", "sessions",
where: Map.of(
expires_at: Map.of( $"LT", "$Now()" )
)
),
"retries", 2,
schedule: Map.of(
"cron", "0 * * * *" // Every hour
)
));
sessionCleanup := client.database.dispatch({
"database": "sessions-db",
"operation": "delete",
input: {
"table": "sessions",
where: {
expires_at: { $"LT": "$Now()" }
}
},
"retries": 2,
schedule: {
"cron": "0 * * * *" // Every hour
}
});
var sessionCleanup = await ductape.database.dispatch({
["database"] = "sessions-db",
["operation"] = "delete",
input: {
["table"] = "sessions",
where: {
expires_at: { $["LT"] = "$Now()" }
}
},
["retries"] = 2,
schedule: {
["cron"] = "0 * * * *" // Every hour
}
});
Log Rotation
Archive old logs monthly:
- TypeScript
- Java
- Go
- .NET
const logRotation = await ductape.features.dispatch({
feature: 'rotate_logs',
input: {
olderThanDays: 30,
archiveLocation: 's3://logs-archive/',
compress: true
},
retries: 3,
schedule: {
cron: '0 3 1 * *', // 3 AM on the 1st of each month
tz: 'UTC'
}
});
Map<String, Object> logRotation = ductape.features.dispatch(Map.of(
"feature", "rotate_logs",
input: Map.of(
"olderThanDays", 30,
"archiveLocation", "s3://logs-archive/",
"compress", true
),
"retries", 3,
schedule: Map.of(
"cron", "0 3 1 * *", // 3 AM on the 1st of each month
"tz", "UTC"
)
));
logRotation := client.features.dispatch({
"feature": "rotate_logs",
input: {
"olderThanDays": 30,
"archiveLocation": "s3://logs-archive/",
"compress": true
},
"retries": 3,
schedule: {
"cron": "0 3 1 * *", // 3 AM on the 1st of each month
"tz": "UTC"
}
});
var logRotation = await ductape.features.dispatch({
["feature"] = "rotate_logs",
input: {
["olderThanDays"] = 30,
["archiveLocation"] = "s3://logs-archive/",
["compress"] = true
},
["retries"] = 3,
schedule: {
["cron"] = "0 3 1 * *", // 3 AM on the 1st of each month
["tz"] = "UTC"
}
});
Temporary Files Cleanup
Clean temporary files daily:
- TypeScript
- Java
- Go
- .NET
const tempCleanup = await ductape.storage.dispatch({
storage: 'temp-storage',
event: 'cleanup_temp',
input: {
olderThanHours: 24,
patterns: ['*.tmp', '*.temp', 'upload_*']
},
retries: 2,
schedule: {
cron: '30 4 * * *', // 4:30 AM daily
tz: 'UTC'
}
});
Map<String, Object> tempCleanup = ductape.storage.dispatch(Map.of(
"storage", "temp-storage",
"event", "cleanup_temp",
input: Map.of(
"olderThanHours", 24,
patterns: ['*.tmp', '*.temp', 'upload_*']
),
"retries", 2,
schedule: Map.of(
"cron", "30 4 * * *", // "4", 30 AM daily
"tz", "UTC"
)
));
tempCleanup := client.storage.dispatch({
"storage": "temp-storage",
"event": "cleanup_temp",
input: {
"olderThanHours": 24,
patterns: ['*.tmp', '*.temp', 'upload_*']
},
"retries": 2,
schedule: {
"cron": "30 4 * * *", // "4": 30 AM daily
"tz": "UTC"
}
});
var tempCleanup = await ductape.storage.dispatch({
["storage"] = "temp-storage",
["event"] = "cleanup_temp",
input: {
["olderThanHours"] = 24,
patterns: ['*.tmp', '*.temp', 'upload_*']
},
["retries"] = 2,
schedule: {
["cron"] = "30 4 * * *", // ["4"] = 30 AM daily
["tz"] = "UTC"
}
});
Database Optimization
Run database optimization weekly:
- TypeScript
- Java
- Go
- .NET
const dbOptimization = await ductape.database.dispatch({
database: 'main-db',
operation: 'insert',
input: {
table: 'maintenance_logs',
data: {
task: 'optimize_tables',
operations: ['VACUUM', 'ANALYZE', 'REINDEX'],
started_at: '$Now()'
}
},
retries: 2,
schedule: {
cron: '0 3 * * 0', // 3 AM every Sunday
tz: 'UTC'
}
});
Map<String, Object> dbOptimization = ductape.database.dispatch(Map.of(
"database", "main-db",
"operation", "insert",
input: Map.of(
"table", "maintenance_logs",
data: Map.of(
"task", "optimize_tables",
operations: ['VACUUM', 'ANALYZE', 'REINDEX'],
"started_at", "$Now()"
)
),
"retries", 2,
schedule: Map.of(
"cron", "0 3 * * 0", // 3 AM every Sunday
"tz", "UTC"
)
));
dbOptimization := client.database.dispatch({
"database": "main-db",
"operation": "insert",
input: {
"table": "maintenance_logs",
data: {
"task": "optimize_tables",
operations: ['VACUUM', 'ANALYZE', 'REINDEX'],
"started_at": "$Now()"
}
},
"retries": 2,
schedule: {
"cron": "0 3 * * 0", // 3 AM every Sunday
"tz": "UTC"
}
});
var dbOptimization = await ductape.database.dispatch({
["database"] = "main-db",
["operation"] = "insert",
input: {
["table"] = "maintenance_logs",
data: {
["task"] = "optimize_tables",
operations: ['VACUUM', 'ANALYZE', 'REINDEX'],
["started_at"] = "$Now()"
}
},
["retries"] = 2,
schedule: {
["cron"] = "0 3 * * 0", // 3 AM every Sunday
["tz"] = "UTC"
}
});
Integrations & Sync
Inventory Sync
Sync inventory from suppliers every 6 hours:
- TypeScript
- Java
- Go
- .NET
const inventorySync = await ductape.api.dispatch({
app: 'supplier-sync',
event: 'sync_all_suppliers',
input: {
suppliers: ['supplier_1', 'supplier_2', 'supplier_3'],
fullSync: false
},
retries: 3,
retryConfig: {
initialDelay: 5000,
maxDelay: 300000,
retryableErrors: ['TIMEOUT', 'RATE_LIMITED']
},
schedule: {
cron: '0 */6 * * *' // Every 6 hours
}
});
Map<String, Object> inventorySync = ductape.api().dispatch(Map<String, Object>.of(
"app", "supplier-sync",
"event", "sync_all_suppliers",
input: Map.of(
suppliers: ['supplier_1', 'supplier_2', 'supplier_3'],
"fullSync", false
),
"retries", 3,
retryConfig: Map.of(
"initialDelay", 5000,
"maxDelay", 300000,
retryableErrors: ['TIMEOUT', 'RATE_LIMITED']
),
schedule: Map.of(
"cron", "0 */6 * * *" // Every 6 hours
)
));
import "context"
inventorySync := client.Api.Dispatch(ctx, map[string]any{
"app": "supplier-sync",
"event": "sync_all_suppliers",
input: {
suppliers: ['supplier_1', 'supplier_2', 'supplier_3'],
"fullSync": false
},
"retries": 3,
retryConfig: {
"initialDelay": 5000,
"maxDelay": 300000,
retryableErrors: ['TIMEOUT', 'RATE_LIMITED']
},
schedule: {
"cron": "0 */6 * * *" // Every 6 hours
}
});
var inventorySync = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "supplier-sync",
["event"] = "sync_all_suppliers",
input: {
suppliers: ['supplier_1', 'supplier_2', 'supplier_3'],
["fullSync"] = false
},
["retries"] = 3,
retryConfig: {
["initialDelay"] = 5000,
["maxDelay"] = 300000,
retryableErrors: ['TIMEOUT', 'RATE_LIMITED']
},
schedule: {
["cron"] = "0 */6 * * *" // Every 6 hours
}
});
CRM Sync
Sync contacts with CRM nightly:
- TypeScript
- Java
- Go
- .NET
const crmSync = await ductape.api.dispatch({
app: 'salesforce-connector',
event: 'sync_contacts',
input: {
direction: 'bidirectional',
lastSyncTime: '$DateAdd($Now(), -24, "hours")'
},
retries: 3,
schedule: {
cron: '0 1 * * *', // 1 AM daily
tz: 'America/Los_Angeles'
}
});
Map<String, Object> crmSync = ductape.api().dispatch(Map<String, Object>.of(
"app", "salesforce-connector",
"event", "sync_contacts",
input: Map.of(
"direction", "bidirectional",
"lastSyncTime", "$DateAdd($Now(), -24, "hours")"
),
"retries", 3,
schedule: Map.of(
"cron", "0 1 * * *", // 1 AM daily
"tz", "America/Los_Angeles"
)
));
import "context"
crmSync := client.Api.Dispatch(ctx, map[string]any{
"app": "salesforce-connector",
"event": "sync_contacts",
input: {
"direction": "bidirectional",
"lastSyncTime": "$DateAdd($Now(), -24, "hours")"
},
"retries": 3,
schedule: {
"cron": "0 1 * * *", // 1 AM daily
"tz": "America/Los_Angeles"
}
});
var crmSync = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "salesforce-connector",
["event"] = "sync_contacts",
input: {
["direction"] = "bidirectional",
["lastSyncTime"] = "$DateAdd($Now(), -24, "hours")"
},
["retries"] = 3,
schedule: {
["cron"] = "0 1 * * *", // 1 AM daily
["tz"] = "America/Los_Angeles"
}
});
Price Update from Feed
Update product prices from feed every hour:
- TypeScript
- Java
- Go
- .NET
const priceUpdate = await ductape.api.dispatch({
app: 'price-service',
event: 'update_prices_from_feed',
input: {
feedUrl: 'https://api.supplier.com/prices',
applyImmediately: true
},
retries: 3,
schedule: {
cron: '0 * * * *' // Every hour
}
});
Map<String, Object> priceUpdate = ductape.api().dispatch(Map<String, Object>.of(
"app", "price-service",
"event", "update_prices_from_feed",
input: Map.of(
"feedUrl", "https://api.supplier.com/prices",
"applyImmediately", true
),
"retries", 3,
schedule: Map.of(
"cron", "0 * * * *" // Every hour
)
));
import "context"
priceUpdate := client.Api.Dispatch(ctx, map[string]any{
"app": "price-service",
"event": "update_prices_from_feed",
input: {
"feedUrl": "https://api.supplier.com/prices",
"applyImmediately": true
},
"retries": 3,
schedule: {
"cron": "0 * * * *" // Every hour
}
});
var priceUpdate = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "price-service",
["event"] = "update_prices_from_feed",
input: {
["feedUrl"] = "https://api.supplier.com/prices",
["applyImmediately"] = true
},
["retries"] = 3,
schedule: {
["cron"] = "0 * * * *" // Every hour
}
});
Billing & Subscriptions
Monthly Billing
Process monthly subscriptions on the 1st:
- TypeScript
- Java
- Go
- .NET
const monthlyBilling = await ductape.api.dispatch({
app: 'subscription-service',
event: 'process_monthly_renewals',
input: {
billingCycle: 'monthly',
date: '$Format($Now(), "YYYY-MM-DD")'
},
retries: 5,
retryConfig: {
nonRetryableErrors: ['CARD_DECLINED', 'SUBSCRIPTION_CANCELLED']
},
schedule: {
cron: '0 6 1 * *', // 6 AM on the 1st of each month
tz: 'UTC'
}
});
Map<String, Object> monthlyBilling = ductape.api().dispatch(Map<String, Object>.of(
"app", "subscription-service",
"event", "process_monthly_renewals",
input: Map.of(
"billingCycle", "monthly",
"date", "$Format($Now(), "YYYY-MM-DD")"
),
"retries", 5,
retryConfig: Map.of(
nonRetryableErrors: ['CARD_DECLINED', 'SUBSCRIPTION_CANCELLED']
),
schedule: Map.of(
"cron", "0 6 1 * *", // 6 AM on the 1st of each month
"tz", "UTC"
)
));
import "context"
monthlyBilling := client.Api.Dispatch(ctx, map[string]any{
"app": "subscription-service",
"event": "process_monthly_renewals",
input: {
"billingCycle": "monthly",
"date": "$Format($Now(), "YYYY-MM-DD")"
},
"retries": 5,
retryConfig: {
nonRetryableErrors: ['CARD_DECLINED', 'SUBSCRIPTION_CANCELLED']
},
schedule: {
"cron": "0 6 1 * *", // 6 AM on the 1st of each month
"tz": "UTC"
}
});
var monthlyBilling = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "subscription-service",
["event"] = "process_monthly_renewals",
input: {
["billingCycle"] = "monthly",
["date"] = "$Format($Now(), "YYYY-MM-DD")"
},
["retries"] = 5,
retryConfig: {
nonRetryableErrors: ['CARD_DECLINED', 'SUBSCRIPTION_CANCELLED']
},
schedule: {
["cron"] = "0 6 1 * *", // 6 AM on the 1st of each month
["tz"] = "UTC"
}
});
Usage Metering
Calculate usage metrics hourly:
- TypeScript
- Java
- Go
- .NET
const usageMetering = await ductape.features.dispatch({
feature: 'calculate_usage_metrics',
input: {
hourStart: '$DateAdd($Now(), -1, "hours")',
hourEnd: '$Now()'
},
retries: 2,
schedule: {
cron: '5 * * * *' // 5 minutes past every hour
}
});
Map<String, Object> usageMetering = ductape.features.dispatch(Map.of(
"feature", "calculate_usage_metrics",
input: Map.of(
"hourStart", "$DateAdd($Now(), -1, "hours")",
"hourEnd", "$Now()"
),
"retries", 2,
schedule: Map.of(
"cron", "5 * * * *" // 5 minutes past every hour
)
));
usageMetering := client.features.dispatch({
"feature": "calculate_usage_metrics",
input: {
"hourStart": "$DateAdd($Now(), -1, "hours")",
"hourEnd": "$Now()"
},
"retries": 2,
schedule: {
"cron": "5 * * * *" // 5 minutes past every hour
}
});
var usageMetering = await ductape.features.dispatch({
["feature"] = "calculate_usage_metrics",
input: {
["hourStart"] = "$DateAdd($Now(), -1, "hours")",
["hourEnd"] = "$Now()"
},
["retries"] = 2,
schedule: {
["cron"] = "5 * * * *" // 5 minutes past every hour
}
});
Trial Expiration Check
Check for expiring trials daily:
- TypeScript
- Java
- Go
- .NET
const trialCheck = await ductape.database.dispatch({
database: 'subscriptions-db',
operation: 'query',
input: {
table: 'subscriptions',
where: {
status: 'trial',
trial_ends_at: {
$BETWEEN: ['$Now()', '$DateAdd($Now(), 3, "days")']
}
}
},
schedule: {
cron: '0 10 * * *', // 10 AM daily
tz: 'America/New_York'
}
});
Map<String, Object> trialCheck = ductape.database.dispatch(Map.of(
"database", "subscriptions-db",
"operation", "query",
input: Map.of(
"table", "subscriptions",
where: Map.of(
"status", "trial",
trial_ends_at: Map.of(
$BETWEEN: ['$Now()', '$DateAdd($Now(), 3, "days")']
)
)
),
schedule: Map.of(
"cron", "0 10 * * *", // 10 AM daily
"tz", "America/New_York"
)
));
trialCheck := client.database.dispatch({
"database": "subscriptions-db",
"operation": "query",
input: {
"table": "subscriptions",
where: {
"status": "trial",
trial_ends_at: {
$BETWEEN: ['$Now()', '$DateAdd($Now(), 3, "days")']
}
}
},
schedule: {
"cron": "0 10 * * *", // 10 AM daily
"tz": "America/New_York"
}
});
var trialCheck = await ductape.database.dispatch({
["database"] = "subscriptions-db",
["operation"] = "query",
input: {
["table"] = "subscriptions",
where: {
["status"] = "trial",
trial_ends_at: {
$BETWEEN: ['$Now()', '$DateAdd($Now(), 3, "days")']
}
}
},
schedule: {
["cron"] = "0 10 * * *", // 10 AM daily
["tz"] = "America/New_York"
}
});
Monitoring & Health
Health Checks
Run health checks every 5 minutes:
- TypeScript
- Java
- Go
- .NET
const healthCheck = await ductape.api.dispatch({
app: 'health-service',
event: 'check_all_services',
input: {
services: ['api', 'database', 'cache', 'queue'],
alertOnFailure: true
},
retries: 1,
schedule: {
cron: '*/5 * * * *' // Every 5 minutes
}
});
Map<String, Object> healthCheck = ductape.api().dispatch(Map<String, Object>.of(
"app", "health-service",
"event", "check_all_services",
input: Map.of(
services: ['api', 'database', 'cache', 'queue'],
"alertOnFailure", true
),
"retries", 1,
schedule: Map.of(
"cron", "*/5 * * * *" // Every 5 minutes
)
));
import "context"
healthCheck := client.Api.Dispatch(ctx, map[string]any{
"app": "health-service",
"event": "check_all_services",
input: {
services: ['api', 'database', 'cache', 'queue'],
"alertOnFailure": true
},
"retries": 1,
schedule: {
"cron": "*/5 * * * *" // Every 5 minutes
}
});
var healthCheck = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "health-service",
["event"] = "check_all_services",
input: {
services: ['api', 'database', 'cache', 'queue'],
["alertOnFailure"] = true
},
["retries"] = 1,
schedule: {
["cron"] = "*/5 * * * *" // Every 5 minutes
}
});
Performance Metrics
Collect performance metrics every minute:
- TypeScript
- Java
- Go
- .NET
const perfMetrics = await ductape.api.dispatch({
app: 'metrics-collector',
event: 'collect_metrics',
input: {
metrics: ['cpu', 'memory', 'disk', 'network', 'latency'],
aggregation: '1m'
},
retries: 0, // Don't retry - next collection will happen soon
schedule: {
cron: '* * * * *' // Every minute
}
});
Map<String, Object> perfMetrics = ductape.api().dispatch(Map<String, Object>.of(
"app", "metrics-collector",
"event", "collect_metrics",
input: Map.of(
metrics: ['cpu', 'memory', 'disk', 'network', 'latency'],
"aggregation", "1m"
),
"retries", 0, // Don't retry - next collection will happen soon
schedule: Map.of(
"cron", "* * * * *" // Every minute
)
));
import "context"
perfMetrics := client.Api.Dispatch(ctx, map[string]any{
"app": "metrics-collector",
"event": "collect_metrics",
input: {
metrics: ['cpu', 'memory', 'disk', 'network', 'latency'],
"aggregation": "1m"
},
"retries": 0, // Don't retry - next collection will happen soon
schedule: {
"cron": "* * * * *" // Every minute
}
});
var perfMetrics = await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "metrics-collector",
["event"] = "collect_metrics",
input: {
metrics: ['cpu', 'memory', 'disk', 'network', 'latency'],
["aggregation"] = "1m"
},
["retries"] = 0, // Don't retry - next collection will happen soon
schedule: {
["cron"] = "* * * * *" // Every minute
}
});
Daily Summary Report
Generate operational summary daily:
- TypeScript
- Java
- Go
- .NET
const opsSummary = await ductape.features.dispatch({
feature: 'generate_ops_summary',
input: {
period: 'daily',
includeAlerts: true,
includeMetrics: true,
recipients: ['ops-team@company.com']
},
retries: 2,
schedule: {
cron: '0 8 * * *', // 8 AM daily
tz: 'America/New_York'
}
});
Map<String, Object> opsSummary = ductape.features.dispatch(Map.of(
"feature", "generate_ops_summary",
input: Map.of(
"period", "daily",
"includeAlerts", true,
"includeMetrics", true,
recipients: ['ops-team@company.com']
),
"retries", 2,
schedule: Map.of(
"cron", "0 8 * * *", // 8 AM daily
"tz", "America/New_York"
)
));
opsSummary := client.features.dispatch({
"feature": "generate_ops_summary",
input: {
"period": "daily",
"includeAlerts": true,
"includeMetrics": true,
recipients: ['ops-team@company.com']
},
"retries": 2,
schedule: {
"cron": "0 8 * * *", // 8 AM daily
"tz": "America/New_York"
}
});
var opsSummary = await ductape.features.dispatch({
["feature"] = "generate_ops_summary",
input: {
["period"] = "daily",
["includeAlerts"] = true,
["includeMetrics"] = true,
recipients: ['ops-team@company.com']
},
["retries"] = 2,
schedule: {
["cron"] = "0 8 * * *", // 8 AM daily
["tz"] = "America/New_York"
}
});
E-commerce
Abandoned Cart Reminders
Send reminders for abandoned carts:
- TypeScript
- Java
- Go
- .NET
// Run every hour, find carts abandoned 1-24 hours ago
const abandonedCartReminder = await ductape.features.dispatch({
feature: 'send_abandoned_cart_reminders',
input: {
abandonedAfterHours: 1,
abandonedBeforeHours: 24,
maxReminders: 2
},
retries: 2,
schedule: {
cron: '0 * * * *' // Every hour
}
});
// Run every hour, find carts abandoned 1-24 hours ago
Map<String, Object> abandonedCartReminder = ductape.features.dispatch(Map.of(
"feature", "send_abandoned_cart_reminders",
input: Map.of(
"abandonedAfterHours", 1,
"abandonedBeforeHours", 24,
"maxReminders", 2
),
"retries", 2,
schedule: Map.of(
"cron", "0 * * * *" // Every hour
)
));
// Run every hour, find carts abandoned 1-24 hours ago
abandonedCartReminder := client.features.dispatch({
"feature": "send_abandoned_cart_reminders",
input: {
"abandonedAfterHours": 1,
"abandonedBeforeHours": 24,
"maxReminders": 2
},
"retries": 2,
schedule: {
"cron": "0 * * * *" // Every hour
}
});
// Run every hour, find carts abandoned 1-24 hours ago
var abandonedCartReminder = await ductape.features.dispatch({
["feature"] = "send_abandoned_cart_reminders",
input: {
["abandonedAfterHours"] = 1,
["abandonedBeforeHours"] = 24,
["maxReminders"] = 2
},
["retries"] = 2,
schedule: {
["cron"] = "0 * * * *" // Every hour
}
});
Flash Sale Management
Schedule flash sale start and end:
- TypeScript
- Java
- Go
- .NET
async function scheduleFlashSale(saleId: string, startTime: number, endTime: number) {
// Start the sale
await ductape.api.dispatch({
app: 'promotions-service',
event: 'activate_sale',
input: {
saleId,
action: 'start'
},
retries: 3,
schedule: {
start_at: startTime
}
});
// End the sale
await ductape.api.dispatch({
app: 'promotions-service',
event: 'deactivate_sale',
input: {
saleId,
action: 'end'
},
retries: 3,
schedule: {
start_at: endTime
}
});
}
async function scheduleFlashSale(saleId: string, startTime: number, endTime: number) Map.of(
// Start the sale
ductape.api().dispatch(Map<String, Object>.of(
"app", "promotions-service",
"event", "activate_sale",
input: Map.of(
saleId,
"action", "start"
),
"retries", 3,
schedule: Map.of(
start_at: startTime
)
));
// End the sale
ductape.api().dispatch(Map<String, Object>.of(
"app", "promotions-service",
"event", "deactivate_sale",
input: Map.of(
saleId,
"action", "end"
),
"retries", 3,
schedule: Map.of(
start_at: endTime
)
));
)
import "context"
async function scheduleFlashSale(saleId: string, startTime: number, endTime: number) {
// Start the sale
client.Api.Dispatch(ctx, map[string]any{
"app": "promotions-service",
"event": "activate_sale",
input: {
saleId,
"action": "start"
},
"retries": 3,
schedule: {
start_at: startTime
}
});
// End the sale
client.Api.Dispatch(ctx, map[string]any{
"app": "promotions-service",
"event": "deactivate_sale",
input: {
saleId,
"action": "end"
},
"retries": 3,
schedule: {
start_at: endTime
}
});
}
async function scheduleFlashSale(saleId: string, startTime: number, endTime: number) {
// Start the sale
await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "promotions-service",
["event"] = "activate_sale",
input: {
saleId,
["action"] = "start"
},
["retries"] = 3,
schedule: {
start_at: startTime
}
});
// End the sale
await await ductape.Api.DispatchAsync(new Dictionary<string, object?>
{
["app"] = "promotions-service",
["event"] = "deactivate_sale",
input: {
saleId,
["action"] = "end"
},
["retries"] = 3,
schedule: {
start_at: endTime
}
});
}
Inventory Low Stock Alerts
Check inventory levels twice daily:
- TypeScript
- Java
- Go
- .NET
const lowStockAlert = await ductape.features.dispatch({
feature: 'check_low_stock',
input: {
thresholds: {
warning: 50,
critical: 10
},
notifyChannels: ['email', 'slack']
},
retries: 2,
schedule: {
cron: '0 9,17 * * *', // 9 AM and 5 PM
tz: 'America/New_York'
}
});
Map<String, Object> lowStockAlert = ductape.features.dispatch(Map.of(
"feature", "check_low_stock",
input: Map.of(
thresholds: Map.of(
"warning", 50,
"critical", 10
),
notifyChannels: ['email', 'slack']
),
"retries", 2,
schedule: Map.of(
"cron", "0 9,17 * * *", // 9 AM and 5 PM
"tz", "America/New_York"
)
));
lowStockAlert := client.features.dispatch({
"feature": "check_low_stock",
input: {
thresholds: {
"warning": 50,
"critical": 10
},
notifyChannels: ['email', 'slack']
},
"retries": 2,
schedule: {
"cron": "0 9,17 * * *", // 9 AM and 5 PM
"tz": "America/New_York"
}
});
var lowStockAlert = await ductape.features.dispatch({
["feature"] = "check_low_stock",
input: {
thresholds: {
["warning"] = 50,
["critical"] = 10
},
notifyChannels: ['email', 'slack']
},
["retries"] = 2,
schedule: {
["cron"] = "0 9,17 * * *", // 9 AM and 5 PM
["tz"] = "America/New_York"
}
});
Message Processing
Queue Processing
Process message queue continuously:
- TypeScript
- Java
- Go
- .NET
const queueProcessor = await ductape.events.dispatch({
broker: 'sqs-main',
event: 'process_queue',
input: {
message: {
queue: 'order-processing',
maxMessages: 100,
visibilityTimeout: 30
}
},
retries: 2,
schedule: {
every: 30000 // Every 30 seconds
}
});
Map<String, Object> queueProcessor = ductape.events.dispatch(Map.of(
"broker", "sqs-main",
"event", "process_queue",
input: Map.of(
message: Map.of(
"queue", "order-processing",
"maxMessages", 100,
"visibilityTimeout", 30
)
),
"retries", 2,
schedule: Map.of(
"every", 30000 // Every 30 seconds
)
));
queueProcessor := client.events.dispatch({
"broker": "sqs-main",
"event": "process_queue",
input: {
message: {
"queue": "order-processing",
"maxMessages": 100,
"visibilityTimeout": 30
}
},
"retries": 2,
schedule: {
"every": 30000 // Every 30 seconds
}
});
var queueProcessor = await ductape.events.dispatch({
["broker"] = "sqs-main",
["event"] = "process_queue",
input: {
message: {
["queue"] = "order-processing",
["maxMessages"] = 100,
["visibilityTimeout"] = 30
}
},
["retries"] = 2,
schedule: {
["every"] = 30000 // Every 30 seconds
}
});
Event Replay
Replay failed events daily:
- TypeScript
- Java
- Go
- .NET
const eventReplay = await ductape.events.dispatch({
broker: 'kafka-main',
event: 'replay_failed_events',
input: {
message: {
fromTopic: 'failed-events',
toTopic: 'events',
olderThanHours: 1
}
},
retries: 2,
schedule: {
cron: '0 4 * * *', // 4 AM daily
tz: 'UTC'
}
});
Map<String, Object> eventReplay = ductape.events.dispatch(Map.of(
"broker", "kafka-main",
"event", "replay_failed_events",
input: Map.of(
message: Map.of(
"fromTopic", "failed-events",
"toTopic", "events",
"olderThanHours", 1
)
),
"retries", 2,
schedule: Map.of(
"cron", "0 4 * * *", // 4 AM daily
"tz", "UTC"
)
));
eventReplay := client.events.dispatch({
"broker": "kafka-main",
"event": "replay_failed_events",
input: {
message: {
"fromTopic": "failed-events",
"toTopic": "events",
"olderThanHours": 1
}
},
"retries": 2,
schedule: {
"cron": "0 4 * * *", // 4 AM daily
"tz": "UTC"
}
});
var eventReplay = await ductape.events.dispatch({
["broker"] = "kafka-main",
["event"] = "replay_failed_events",
input: {
message: {
["fromTopic"] = "failed-events",
["toTopic"] = "events",
["olderThanHours"] = 1
}
},
["retries"] = 2,
schedule: {
["cron"] = "0 4 * * *", // 4 AM daily
["tz"] = "UTC"
}
});
Limited Duration Jobs
Campaign with End Date
Run promotion check until campaign ends:
- TypeScript
- Java
- Go
- .NET
const campaignCheck = await ductape.features.dispatch({
feature: 'check_campaign_performance',
input: {
campaignId: 'summer_sale_2025'
},
retries: 2,
schedule: {
every: 3600000, // Every hour
endDate: '2025-08-31T23:59:59Z' // Campaign ends Aug 31
}
});
Map<String, Object> campaignCheck = ductape.features.dispatch(Map.of(
"feature", "check_campaign_performance",
input: Map.of(
"campaignId", "summer_sale_2025"
),
"retries", 2,
schedule: Map.of(
"every", 3600000, // Every hour
"endDate", "2025-08-"31T23", 59:59Z" // Campaign ends Aug 31
)
));
campaignCheck := client.features.dispatch({
"feature": "check_campaign_performance",
input: {
"campaignId": "summer_sale_2025"
},
"retries": 2,
schedule: {
"every": 3600000, // Every hour
"endDate": "2025-08-"31T23": 59:59Z" // Campaign ends Aug 31
}
});
var campaignCheck = await ductape.features.dispatch({
["feature"] = "check_campaign_performance",
input: {
["campaignId"] = "summer_sale_2025"
},
["retries"] = 2,
schedule: {
["every"] = 3600000, // Every hour
["endDate"] = "2025-08-["31T23"] = 59:59Z" // Campaign ends Aug 31
}
});
Limited Retry Job
Send max 4 weekly reminders:
- TypeScript
- Java
- Go
- .NET
const weeklyReminder = await ductape.notifications.dispatch({
notification: 'user-emails',
event: 'weekly_inactive_reminder',
input: {
email: {
recipients: ['inactive@example.com'],
template: { weekNumber: '$Var(execution_count)' }
}
},
retries: 2,
schedule: {
every: 604800000, // Weekly
limit: 4 // Max 4 reminders
}
});
Map<String, Object> weeklyReminder = ductape.notifications.dispatch(Map.of(
"notification", "user-emails",
"event", "weekly_inactive_reminder",
input: Map.of(
email: Map.of(
recipients: ['inactive@example.com'],
template: Map.of( "weekNumber", "$Var(execution_count)" )
)
),
"retries", 2,
schedule: Map.of(
"every", 604800000, // Weekly
"limit", 4 // Max 4 reminders
)
));
weeklyReminder := client.notifications.dispatch({
"notification": "user-emails",
"event": "weekly_inactive_reminder",
input: {
email: {
recipients: ['inactive@example.com'],
template: { "weekNumber": "$Var(execution_count)" }
}
},
"retries": 2,
schedule: {
"every": 604800000, // Weekly
"limit": 4 // Max 4 reminders
}
});
var weeklyReminder = await ductape.notifications.dispatch({
["notification"] = "user-emails",
["event"] = "weekly_inactive_reminder",
input: {
email: {
recipients: ['inactive@example.com'],
template: { ["weekNumber"] = "$Var(execution_count)" }
}
},
["retries"] = 2,
schedule: {
["every"] = 604800000, // Weekly
["limit"] = 4 // Max 4 reminders
}
});
See Also
- Scheduling Jobs - Overview of job scheduling
- Cron Expressions - Master cron syntax
- Job Management - Monitor and control jobs
- Retry Strategies - Handle failures