- 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
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