Using the Plesk Windows Scheduler to call an ASP or .NET page

How to use Plesk for Windows Scheduler to call a particular ASP or ASP.NET script on your web site that will perform a function.

Steps:

1. Click on 'Scheduled Tasks' in Plesk

2. Click on 'Schedule New Task'

3. Enter a description and notification email if required

4. In the 'Path to executable file' field, enter the following path: C:\Windows\system32\cscript.exe

5. In the Arguments field enter the following: D:\Inetpub\vhosts\domain.com\httpdocs\schedule.vbs  (replacing domain.com with your domain name)

6. cscript.exe won't execute an asp file, because of that we need to create a vbs script, that will then call the asp script. In the schedule.vbs script, we need to use the xmlhttp request to open a web page. Copy and paste the script below and save to a file called schedule.vbs and upload this to your site.

----------------------------
Call RunIt()
Sub RunIt()

Dim RequestObj
Dim URL
Set RequestObj = CreateObject("Microsoft.XMLHTTP")

'Request URL...
URL = "http://domain.com/myScript.aspx"

'Open request and pass the URL
RequestObj.open "POST", URL , false

'Send Request
RequestObj.Send

'cleanup
Set RequestObj = Nothing
End Sub
---------------------------------------------

7. Now you can create your myscript.aspx page, or whatever you would like to name it to perform the tasks you require to be scheduled.
  • 37 Users Found This Useful
Was this answer helpful?

Related Articles

How do I set file/folder permission with Plesk file manager

To set file / folder permission for Plesk panel hosting account1. Log in to Plesk2. Click "Files"...

How do I enable webmail in Plesk?

1. Login to plesk control panel.2. Click on the domain you want to enable Webmail3. Click on the...

How do I set my website default page using Plesk?

1. Login to Plesk Control panel2. Click the "Virtual Directories" 3. Virtual directories section...

How do I change password for an e-mail ID in Plesk ?

To change password of an e-mail ID follow the steps mentioned below. 1. Login to Plesk control...

How to view space usage of hosting account in Plesk?

Login to your plesk control panel account. 1. Select Statistics > Summary report 2. Select...