Developer forum

Forum » CMS - Standard features » Scheduled tasks for files in CustomModules

Scheduled tasks for files in CustomModules

Adrian Ursu
Reply

Hello,

Can I use scheduled tasks for an aspx located in CustomModules? I've set up a task, but it is not executed.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

Yes you can - it can call any URL.

It can be either a DNS issue on the server - calling its own domain on the server can sometimes not work. So log on to the server and see if you can browse the URL. If not, add a hosts record to 127.0.0.1 and make sure your site is captured on that host/ip (Hostheader setup in IIS).

Also check that the Windows Scheduled task has been setup on the server - it is a task in Windows that runs the DW tasks - so make sure it is enabled.

Service desk can check this for you if you are hosting at Hostnordic

 
Morten Bengtson
Reply
This post has been marked as an answer

I might be wrong, but I don't think you can call aspx, ashx and similar from a scheduled task if these are located in the CustomModules folder, because it is a "special folder" and executing code here requires admin login (which is a good thing). If your scheduled task makes a request for e.g. /CustomModules/MyModule/SomePage.aspx then it will be redirected to the admin login screen.

You can place your aspx in a different folder, e.g. /ScheduledTasks, an make your scheduled task call that without any problems. You could optionally protect that page by restricting access to it in IIS.

Votes for this answer: 1
 
Nicolai Høeg Pedersen
Reply

Ah, yes - good point.

The aspx needs to be placed outside /CustomModules folder.

 
Dan Avramescu
Reply

Ok. I will move it outside the CustomModules folder.

Thanks

 

You must be logged in to post in the forum