1

I am trying to run a scheduled task on my remote server from within Parallels Plesk Panel 9.2.2 and I am trouble trying to figure out what the correct path I should be using is. I tried the URL of the file (what you would type into the browser to find it) but that doesn't work.

Can someone please give me the format I should be using, eg username/root_directory/filename.php? Or any suggestions that I could use to investigate this issue further?

Any help would be greatly appreciated.

2

Cron runs programs, not web sites, so you must provide the path on disk to a command line program or script. You appear to have a PHP script so you have a number of alternatives:

1

Provide the path to the PHP CLI interpreter and pass your script as argument:

php /home/username/root_directory/filename.php

... or:

/usr/bin/php /home/username/root_directory/filename.php

2

Create a PHP shell script:

/home/username/filename.sh

... where filename.sh has "x" permission and looks like:

#!/usr/bin/php
<?php
echo “Hello World!”;
?>

3

Create a bash shell script:

/home/username/filename.sh

... where filename.sh has "x" permission and looks like:

#!/bin/sh
php /home/username/root_directory/filename.php

... or:

#!/bin/sh
/usr/bin/php /home/username/root_directory/filename.php

4

Run an app that can talk HTTP:

wget http://example.com/filename.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy