Task schedule creation succeeds in the Tanzu Data Flow / Spring Cloud Data Flow (SCDF) UI in most cases, but fails when using cURL or direct REST API calls.POST /tasks/schedules returns 400 Bad Request or 500 Internal Server Error with one of the following messages:
Note: The second error can also appear in the UI on certain older Tanzu Data Flow versions due to incorrect property prefix injection.
1. Use the correct fully-qualified property key for Cloud Foundry:
deployer..cloudfoundry.cron.expression=2. Always URL-encode property values that contain spaces or special characters. Prefer --data-urlencode with cURL.
3. Include the platform parameter (normally default).
Recommended cURL example
curl -H "Authorization: $(cf oauth-token)" \
-X POST "https://<SCDF_HOST>/tasks/schedules" \
-d "scheduleName=my-schedule" \
-d "taskDefinitionName=my-task-v1" \
-d "platform=default" \
-d "properties=deployer.my-task-v1.cloudfoundry.cron.expression=0%200%2013%20?%20*%20MON-FRI" \
-d "properties=deployer.my-task-v1.cloudfoundry.services=my-service" \
--data-urlencode "arguments=--spring.profiles.active=prod,cloud"
Alternative (single properties parameter)
You may also pass a comma-separated list inside one --data-urlencode "properties=..." statement; the multi-parameter form above is clearer and less error-prone.
Additional Guidance
Verification
A successful response returns HTTP 201 (or 200 in some versions) and the new schedule appears in the schedule list with the expected cron expression.
Reference: