trigger_cronjob
Execute scheduled tasks in SAP Commerce Cloud by triggering cron jobs with specific codes for system administration and automation.
Instructions
Trigger a cron job to run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cronJobCode | Yes | Code of the cron job to trigger |
Implementation Reference
- src/hybris-client.ts:471-484 (handler)The primary handler function that executes the tool logic by making a POST request to the Hybris HAC endpoint to trigger the specified cron job.async triggerCronJob(cronJobCode: string): Promise<{ success: boolean; message: string }> { const formData = new URLSearchParams(); return this.hacRequest<{ success: boolean; message: string }>( `${this.hacPrefix}/monitoring/cronjobs/${cronJobCode}/trigger`, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: formData, } ); }
- src/index.ts:347-349 (handler)The tool dispatcher in the main server request handler that invokes the specific HybrisClient method for trigger_cronjob.case 'trigger_cronjob': result = await hybrisClient.triggerCronJob(args?.cronJobCode as string); break;
- src/index.ts:200-209 (schema)Defines the input schema for the trigger_cronjob tool, requiring a cronJobCode string.inputSchema: { type: 'object', properties: { cronJobCode: { type: 'string', description: 'Code of the cron job to trigger', }, }, required: ['cronJobCode'], },
- src/index.ts:197-210 (registration)The tool registration object added to the tools list, used in ListToolsRequest response.{ name: 'trigger_cronjob', description: 'Trigger a cron job to run', inputSchema: { type: 'object', properties: { cronJobCode: { type: 'string', description: 'Code of the cron job to trigger', }, }, required: ['cronJobCode'], }, },