• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved API change Cronjobs with CLI (cli/crontab_shell/call)

Giu

Basic Pleskian
Server operating system version
Debian 12.4
Plesk version and microupdate number
18.0.58
Hello Forum,

i want to know how can i set and get cronjobs via api xml or json.

i thought about using /api/v2cli/crontab_shell/call

the command reference for this is:
{
"allowed_commands": {
"update": {
"name": "update",
"info": "Updates crontab shell at domain",
"param": {
"required": true,
"usage": "<domain_name>"
}
},
"help": {
"name": "help",
"info": "Displays this help page."
}
},
"allowed_options": {}
}

so not much info here.

the Help output is:
Usage: crontab_shell command <domain-name> [options]\n\n Available commands:\n --update or -u <domain_name> Updates crontab shell at domain\n --help or -h Displays this help page.\n\n\nVersion: 18.0.58_build1800240123.15 os_Debian 12.0

can anyone help me get started on how to use this?

{
"params": [
"--update",
"mydomain.com",
"..... what are the options?"
]
}
 
There is no method for listing or adding cronjobs in the API's or in the Plesk CLI. Cronjobs can be managed directly via the crontab system command in Linux.
 
  • Like
Reactions: Giu
And to add to this, you can also create and modify files in /var/spool/cron directly (if the user has sufficient permissions).
 
  • Like
Reactions: Giu
thanks @Kaspar and @Peter Debik
but what is the endpoint "/api/v2cli/crontab_shell/call" then for?
It's an undocumented utility. But if I had to take a guess, I would say it probably has something todo with updating the specific shell for running cron jobs. It can't be used to manage crontab itself.
 
  • Like
Reactions: Giu
Back
Top