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