detect timer calls from runtime
Question

Hello, to detect a bug that we have had in our applications due to the execution of a timer, we have gone to consult the tables:

SELECT s.last_run, s.next_run, m.name, e.Name,* FROM OSSYS_CYCLIC_JOB_SHARED s

left join ossys_Meta_Cyclic_Job m on s.META_CYCLIC_JOB_ID = m.id

left join ossys_Espace e on e.ID = m.ESPACE_ID

WHERE LAST_RUN >= cast('27-05-2021 11:00:00' as datetime) and last_run <= cast('27-05-2021 14:00:00' as datetime)

And we have realized that the executions of the unscheduled timers are not reflected, that is, those that we execute at runtime

Is there another way to view these executions?
Solution

Nothing, I know what happened, we have not executed the timer as such but the serveraction associated with the timer, that is why it has not left a record. Mystery solved. Thank you so much for everything.


mvp_badge
MVP

Hi Cris,

That indeed explains it :). Happy coding!

mvp_badge
MVP

Hi Cris,

You are selecting the LAST_RUN to be between certain date/times, but if the timer has never run, it doesn't show up of course. Other than that, your query is basically fine (even though I'd use inner joins and check the modules for being active), and if I execute it on one of our environments, I can see the "unscheduled" timers just fine.

No, we know that the timer was executed, but in runtime (not programmed) between the dates that I have in the where, so it surprises me that when I go to consult the tables it indicated, nothing comes out. That is why I have come to think that for runtime executions no records are created in this table

mvp_badge
MVP

I understand you come to that conclusion, but it is very likely a wrong one. Note that OSSYS_CYCLIC_JOB_SHARED doesn't record any historic runs, only the last one. So I'd advise you to run the query with a WHERE clause that limits m.name to the name of the Timer you're trying to query, and see what its LAST_RUN value actually is.

No, it appears to us that it has never been executed, when as I said, we have executed it in runtime

mvp_badge
MVP

What does Service Center show? Does it show up in the timer list there (https://yourserver/servicecenter/Cyclic_Job_Logs.aspx)?

Solution

Nothing, I know what happened, we have not executed the timer as such but the serveraction associated with the timer, that is why it has not left a record. Mystery solved. Thank you so much for everything.


mvp_badge
MVP

Hi Cris,

That indeed explains it :). Happy coding!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.