• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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