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

Resolved Scheduled Task Result Output to File

A

Anthony Brian Mallgren

Guest
Is there anyway to output the result of a scheduled task to a file? GoDaddy support is asking for it to be output to a 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