• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

running ASP via scheduler

P

parser

Guest
How can i run asp file via scheduler?
when i try
D:\vhosts\vhosts\domain.com\httpdocs\aspfile.asp
is not run,
anybody?

Thanks
David
 
this sounds interesting for me too!
also with .net files (aspx).

Is it possible? and if so how?

Saludos
Pat
 
Asp scripts and scheduler

Yes it is possible with a trick.

You can trigger whatever script you want, even if it is no local, with the following code in php:
PHP:
if ($_GET['password']=='whatever')	{	
$CR = curl_init();					
curl_setopt($CR, CURLOPT_URL, "http://www.domain_name.com/what_ever_script.asp?parameter1=".$_GET['parameter1']);	
curl_setopt($CR, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($CR, CURLOPT_TIMEOUT, 60);
curl_setopt($CR, CURLOPT_POST, 1);
curl_setopt($CR, CURLOPT_POSTFIELDS, "parameter2=".$_GET['parameter2']);
curl_setopt($CR, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($CR, CURLOPT_SSL_VERIFYPEER, 0);
	
$result = curl_exec( $CR );
$error = curl_error( $CR );
	
if( !empty( $error )) {
curl_close( $CR );
echo 'Error:'.$error;
}
curl_close( $CR );
echo 'Ok:'.$result ;
}
Save the previous code as cronJob.php
At scheduler you define the following:

Script path:
c:\program files\swsoft\additional\php\php.exe
(or wherever the php.exe file at your plesk installation is...)

Parameters:
c:\full_server_path_to_file\cronJob.php password=whatever parameter1=value1 parameter2=value2part1+value2part2

Note that:
- Parameters are passed without being splitted with the & symbol (we use spaces instead), and each value must contain the + symbol in case of spaces
- php handles each parameter as a GET parameter
- you can pass parameters to the final script both through POST and GET methods.

CIao.
 
Back
Top