• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

crontab-java-tool fails with subdomain

J

jebbie23

Guest
I'm trying to write a java-command-line tool that will run nightly with crontab. So far, it's already running. But now i want to create a subdomain with the command-line tool from /opt/psa/bin/subdomain - and that is just not working.

When i execute the java-tool directly from the shell, it can create the subdomain withtout any problem, but when it's executet through crontab, i get "Unable to connect to database: get_admin_password()"

I must say, i have already modified the permissions of the folder and files under /etc/sw/keys - just to try if i can go ahead.. because before the current error appeared, he said that he couldn't open the repository under "/etc/sw/keys"

Any ideas how to fix? I'm currentyl thinking about to implement the RPC API in my java-tool, because there i could make a clean authentication as far as i know.
 
Stupid.. i have found the solution by myself.. i have created the cronjob with plesk in my domain.. so it was running under the user of this domain -> problem with priviliges.. so i stopped that job and created a new one directly with crontab on the shell and voilà.. it works like a charm
 
Back
Top