Hello everyone,
I’m trying to use a schedule endpoint to load content from csv files that are updated every day.
It works just fine when I run the Dashboard from the ISE, but not when hosting with IIS. I really don’t see what I am doing wrong here:
$schedule = New-UDEndpointSchedule -Every 1 -Hour
$scheduleImport = New-UDEndpoint -Schedule $schedule -Endpoint {…}
Start-UDDashboard -Dashboard $dashboard -Endpoint @($scheduleImport) -Wait
I tried with the AutoReload parameter as well with same result.
I’m using the last version of UD, Windows Server 2016 (IIS 10).
Anyone experiencing the same issue ?
Thanks !
Hi @Tristan your code looks good to me skimming through it. I’m thinking if this works fine in ISE but not in IIS, then is the folder shared where you are accessing the CSV files from? Do you have any other dashboards running on your IIS? You happy you setup the IIS configuration and sharing on the folder correctly? Im running IIS on windows 10, and I dump all my CSV files in the same directory as I am hosting the dashboard in, and I do not seem to have any issues. I’ve loaded a copy of a dashboard I am running in IIS here:-
I hope this helps?
Hey psDev !
Those are great ideas, I’ll try them as soon as possible, thank you !
cool beans @Tristan if you need any other ideas or suggestions just give a shout…there are lots of very talented powershellers in this forum. I know sometimes its difficult, but if you can post more code, im more than happy to test or figure out why its not working, or try
Hello,
I’m not really sure what fixed the issue but I just tried again and it’s working…
I made some changes on folders and files permissions, but I don’t remember exactly what (don’t judge me ), so I think you were correct, assuming that IIS wasn’t able to access the files.
Thank you again for pointing me (probably) in the right direction.
Have a nice day,
Tristan
1 Like
I’m having the same issue in scheduling endpoints behind IIS. I’m sure that this worked in the past, but I can’t seem to get it working now. Maybe it’s permissions-based?
I’m using the usual $cache:variable method of updating things behind the scenes, but cannot get the schedule working.
Here’s some of the scheduled code:
$EndpointExMessageQueues = New-UDEndpoint -Schedule (New-UDEndpointSchedule -Every 10 -Second) -Endpoint {
$Cache:ExMessageQueues = Get-ExMessageQueues
}
$EndpointExMessageQueues = New-UDEndpoint -url “/exmessagequeues” -method “GET” -Endpoint {
Set-UDContentType “application/json”
$Cache:ExMessageQueues | ConvertTo-JSON
}
If I invoke the Get-ExMessageQueues to update the $Cache:ExMessageQueues manually using another endpoint prior to calling the /api/exmessagequeues path, it triggers and saves the info. But for whatever reason, the schedule simply doesn’t trigger.
In the debug log, it appears that the Quartz scheduler initialises but then ends on this line:
[Debug] Quartz.Core.QuartzSchedulerThread Batch acquisition of 0 triggers
I don’t know if that’s the correct output, or if the number of triggers should correspond to the number of scheduled endpoints…?
There are no error messages, nor anything else to indicate why the endpoints aren’t being scheduled. The log shows when one of the others is invoked via API, but obviously it doesn’t have anything to respond with.
Any thoughts?
Ok, I don’t think it’s permissions-based - I ran the pool as local system (attempting to get local service info), but still nothing.