• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Scheduled Task Result Output to File

Just use > redirection output to file in command of scheduled task.
 
Dear Igor,

I face an issue.

Schedule a Task / Run a command /

wget https://xxxxx/list.json -O /wp-content/uploads/files/attendee.json

reports an error : No such file or directory

The same error occurs with /var/www/vhosts/unidivers.fr/httpdocs/wp-content/uploads/files/attendee.json

Have you a fix ?

Thanks you,

Regards
 
Hi @NicolasUni . Please try
wget <source URL> -P <fully qualified directory path> -O <output filename>
for example
wget https://xxxxx/list.json -P /var/www/vhosts/<domain>/httpdocs/wp-content/uploads/files -O attendee.json
 
Dear Peter,

Unfortunatly, this command runs well with ssh but not within task Plesk scheduler…
Is there a way to create a routine by ssh, I mean to schedule a recursive task (like Plesk scheduler…), each day for instance ?

I would appreciate your kind help,

Best regards,
 
@NicolasUni this should work if as command in the Plesk scheduler.

wget https://example.com/list.json -P /httpdocs/wp-content/uploads/files

Edit: sorry, I just realized also want to rename the file.
 
Okay, I think I got it. I Tested this successfully in the Plesk scheduler:
wget -O httpdocs/wp-content/uploads/files/attendee.json https://example.com/list.json
 
Are you using the Scheduled Tasks option from the domain? Or from Tools & Settings > Scheduled Tasks?

Schermafbeelding 2023-02-25 130332.png
 
May be

wget -O /var/www/vhosts/MY-SITE/httpdocs/wp-content/uploads/files/attendee.json https://REMOTE-SITE/list.json
No, if you are running the scheduled task via Website & domains > Site dashboard > Scheduled Tasks then you don't need to include the full path, because the scheduled task runs from the home directory of the domain (system) user. But you can give it a try of course.

For me wget -O httpdocs/wp-content/uploads/files/attendee.json https://example.com/list.json works, when it test it.

The No such file or directory error indicates an issue with directory. Does the directory files actually exist?
 
Ok, I ve fixed permissions
But, always the same error than before :

Connecting to REMOTE-SERVER.. connected.
ERROR: The certificate of 'exemple.com' is not trusted.
ERROR: The certificate of 'exemple.com' doesn't have a known issuer.
 
Back
Top