Can I create a crontab job using the Rest API?

I am Learning Rest-API https://docs.hestiacp.com/admin_docs/rest_api.html

Can I create a crontab job using the Rest API?
Are there examples of calling the API from the command line via curl (no PHP or NodeJS, I use Perl)?

v-add-cron-job $user "*/5" "*" "*" "*" "*" "/usr/bin/curl https://www.google.com/path/"

Probably I wrote wrong question. I need an example curl call to add a crontab job via the Rest API described here: REST API β€” Hestia Control Panel documentation

while I have never used the api and therefore can’t tell if the cron commands are accepted in general, the given php example should work quite well.
you just need to replace the command and args so the post array can be put together correctly.

for the example command @eris posted you need seven args though - again I am not sure if this is supported/works as intended.

We support up to 9 different arguments + the command so it should be fine

1 Like