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

Question How to use "Run a PHP script" on the plesk schedule tasks and write php script for that.

questhk09

New Pleskian
Hello,

I'm working on developing a photo sharing application where it has to create a jpg file from the mp4 file that the user uploaded to the database.

The below is the command to create jpg file from mp4 file in the particular directory by using ffmpeg.

# for i in `find /var/www/vhosts/xxxxx.com/httpdocs/save/ -type f -name "*.mp4"`; do ffmpeg -i $i `echo $i | sed -En 's/.conf$/.jpg/p'`; done

Now, my question is that,

I'm trying to set up a ffmpeg cron job on plesk schedule via Tools & Settings > Scheduled Tasks > Add Task.
And I would like to use "Run a PHP script" there that should run the command above every time a mp4 file is uploaded to the database.

I am not really sure how I should use the "Run a PHP script" and how to write the php script to run the above mp4/jpg conver command.

I would appreciate if anyone could show me "an example" of this entire process, specially how to write php script(concise one is enough) with respect to the plesk function "Run a PHP script".


OS:centos-6 (x86_64)
Plesk 17.0.17
ffmpeg version 2.2.2
php-devel
PECL imagick
 
Last edited:
Back
Top