• 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 java command works from SSh Terminal but not from Plesk task scheduler

sweetman

Basic Pleskian
Server operating system version
CentOS 7.9
Plesk version and microupdate number
Plesk Obsidian 18.0.44 update #3
Hello all,
I can run succesfully a command line from SSH Terminal in the my Plesk Subscription.
But the same command, in Plesk Scheduler (in the same subscription) doesn't work.
Why?
Please keep in mind that the command will require one or two hours to complete.

Here is the command (simplified):
java -jar httpdocs/connector/Content.jar datasource httpdocs/connector/configuration/Content.xml import

The only difference here are paths:
when I run the command line, before running it, I change the path to the folder containing the script (cd httpdocs/connector/);
then I run the script:

java -jar Content.jar datasource configuration/Content.xml import

This way it works.

In the Plesk Scheduler I created the command including the path to the script to run:
java -jar httpdocs/connector/Content.jar datasource httpdocs/connector/configuration/Content.xml import
When I run the task, I get the pop up saying it has completed succesfully in 1 second and nothing else.

Can I create a batch file the same way as the old MS-DOS and execute it? This way I would use the same commands I would use with the command line. Something like:
MYBATCH.SH
cd httpdocs/connector/
java -jar Content.jar datasource configuration/Content.xml import


Then in Task scheduler I would run this file.

Is this possibile?
TIA
tony
 
Perhaps i solved.
The shell script file command seems to work.
Since the script takes hours to complete, it's safe to close the browser while it is running? (see attahcment)
TIA
Tony
 

Attachments

  • running task.png
    running task.png
    5.5 KB · Views: 4
Perhaps i solved.
The shell script file command seems to work.
Since the script takes hours to complete, it's safe to close the browser while it is running? (see attahcment)
TIA
Tony
I answer myself: yes. The script will continue running even if you close the browser completely.
If you get back to the same page you'll see the same pop up (if the script is still running).
Tony
 
Back
Top