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

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