Authorization: Bearer ********************
{
"name": "Daily Report Generation",
"task": "reports.tasks.generate_report",
"interval": {
"every": 1,
"period": "days"
},
"crontab": {
"minute": "0",
"hour": "9",
"day_of_week": "1-5",
"day_of_month": "*",
"month_of_year": "*",
"timezone": "UTC"
},
"args": [
"daily",
"financial"
],
"kwargs": {
"report_type": "daily",
"include_charts": true
},
"headers": {},
"expires": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"one_off": false,
"start_time": "2019-08-24T14:15:22Z",
"enabled": true,
"description": "Generate daily financial reports"
}
curl --location --request PUT 'https://preprod.api.crego.io/tasks/schedules//' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Daily Report Generation",
"task": "reports.tasks.generate_report",
"interval": {
"every": 1,
"period": "days"
},
"crontab": {
"minute": "0",
"hour": "9",
"day_of_week": "1-5",
"day_of_month": "*",
"month_of_year": "*",
"timezone": "UTC"
},
"args": [
"daily",
"financial"
],
"kwargs": {
"report_type": "daily",
"include_charts": true
},
"headers": {},
"expires": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"one_off": false,
"start_time": "2019-08-24T14:15:22Z",
"enabled": true,
"description": "Generate daily financial reports"
}'
{
"id": 1,
"name": "Daily Report Generation",
"task": "reports.tasks.generate_report",
"interval": {
"id": 1,
"every": 1,
"period": "days"
},
"crontab": {
"id": 1,
"minute": "0",
"hour": "9",
"day_of_week": "1-5",
"day_of_month": "*",
"month_of_year": "*",
"timezone": "UTC"
},
"args": [
"daily",
"financial"
],
"kwargs": {
"report_type": "daily",
"include_charts": true
},
"headers": {},
"expires": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"one_off": false,
"start_time": "2019-08-24T14:15:22Z",
"enabled": true,
"total_run_count": 45,
"last_run_at": "2019-08-24T14:15:22Z",
"date_changed": "2019-08-24T14:15:22Z",
"description": "Generate daily financial reports"
}