I have a scheduled task question: Lucee 5 keeps sa...
# lucee
s
I have a scheduled task question: Lucee 5 keeps saying our scheduled task is invalid, but running the task in the browser, the URL runs perfectly. Executing the task directly also gives this error. Anyone an idea? We're on Windows and Lucee 5.3.9.133. Specs in thread 😉
Task was set for beginning of June, just changed the start time to see if that triggered the task, but alas...
Could it be that I need to fill in the end date?
Ideally I want the task to run every day, every half hour, between 0700 and 1900 hrs (7 AM => 7 PM)
And then I have another 13 tasks that are similar that run at the same interval, but 2 minutes apart from eachother. None of them work btw from the scheduled task page in the Web Admin, but run perfectly in the browser.
b
The screenshot shows the start date to be 11/08/2023 while the current date was 10/08/2023 - that would be why the task was not running.
s
Initially the task was set to beginning of June, but it has never worked, today either...
I've filled in the end dates yesterday to be 31/12/2099, expecting the tasks to run from this morning, but they do not...
a
what i don't understand is why you need to set an end time ?
isn't it a case of you want the task to run until it finishes ?
s
and then it repeats the next day, right?
a
So you want it to run between 7am - 7pm every 30 mins
ok i get it
hadn;t seen the interva
s
added the end date more as a test, to see if it would change anything, it didn't
a
personally not used that we either have tasks running every 30 mins or at set times
s
customer wants emails to arrive at clients during work hours, not in the late evening
a
I guess you could have scheduled task running more frequently then put the logic in the task to determine whether or not there is something to do
im not saying it shouldn't work as you are trying
s
so what I've learned since then is that running a scheduled task via HTTPS doesn''t work in our Lucee install, for some strange reason
what we seem to be doing, which works one of my colleagues told me, is create a local domain (i.e. http://mywebsite.local/) and bind that to the regular domain (https://mywebsite.com/) and then only let it run via http. The request from the Lucee server for the URL from the scheduled task then first checks internally in IIS if it can find a domain with the .local extension, and if so runs is, circumventing the need to go to the outside world and running the HTTPS-call.
for now the scheduled tasks have nothing to do, so I'll have to wait for a new upload coming Monday to test this setup, but this should work.
do you guys run scheduled tasks via HTTPS-calls?
maybe it has something to do that the SSL-cert of LetsEncrypt isn't known in the truststore of the Java install, hence it will not fire? we automagically update our LetsEncrypt certs for our websites every three months, so that would be a burden to install it into the Java truststore as well everytime. if it has any connection to the issue we're dealing with of course 😉
a
we Pixl8 dont use Lucee scheduled tasks we use Preside tasks which uses cfconcurrent and our own scheduling system
👍🏼 1
s
I'll have to read up on that 😉
a
@Sebastiaan Naafs - van Dijk in case you are on the same machine, you could try bypassing https by going to tomcat directly on port:8888.