Weekly scheduled task suddenly running daily

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

Weekly scheduled task suddenly running daily

#1

Postby ericb » Thu Sep 12, 2019 5:27 pm

For over a year now, we've had a weekly scheduled task running every Monday at 7am. That is until Sept 5th of last week however, when it suddenly started running just about daily:
schedule_log.PNG
schedule_log.PNG (8.55 KiB) Viewed 6449 times
The configuration for this task hasn't changed recently, it's always been this:
schedule_config.PNG
schedule_config.PNG (21.36 KiB) Viewed 6449 times
I know the task is really running each of these days, because it sends out emails which I can see in the server/application logs. This was first brought to our attention when a user complained that they were getting these reminders every day all of a sudden, rather than once a week as it was previously.

What could be causing the server to run this scheduled task nearly every day? I did notice that there's no "Next execution" date given for this task, while other weekly tasks do have one. Could this have something to do with it?
schedule_next.PNG
schedule_next.PNG (44.48 KiB) Viewed 6449 times
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Weekly scheduled task suddenly running daily

#2

Postby Jon » Fri Sep 13, 2019 7:37 am

There was a bug with resetting the next execution date for weekly scheduled tasks which was fixed in V5.6 (just released). I think the problem starts when the normal date is missed e.g. your task didn't run on its normal Monday for some reason.

You might try resetting the task. I'm not sure if this will work but it's worth a go. To do this:
1. Get the scheduled task's runtime id - in the latest versions of the studio you can see this in the studio by opening the scheduled task. If not, then open the weeklyQueueReminder.eb file in the workspace file system.
2. Remove the corresponding database record from the runtime_scheduled_tasks table of the server's repository database.
3. This should trigger the scheduler to reset the date.
0 x

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

Re: Weekly scheduled task suddenly running daily

#3

Postby ericb » Fri Sep 13, 2019 5:57 pm

Jon, I wanted to try your solution, but when I went to the runtime_scheduled_tasks table, the runtime ID I was looking for wasn't there. 5 entries were there, but not the one for this task. I happened to refresh later, and another 6 entries had been added, including the one for this weekly task. A few moments later I refreshed again, and the 6 new entries were gone again. I've been monitoring the table since the morning, and 6 entries continuously disappear and reappear a minute later or so. So I can't delete the runtime ID for my weekly task, since it's one of the 6 that already get deleted every few minutes.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Weekly scheduled task suddenly running daily

#4

Postby Jon » Mon Sep 16, 2019 7:37 am

Is it possible that you have two servers running pointing at the same repository database?
0 x

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

Re: Weekly scheduled task suddenly running daily

#5

Postby ericb » Mon Sep 16, 2019 2:01 pm

No, this is the only Ebase application using this workflow database.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Weekly scheduled task suddenly running daily

#6

Postby Jon » Wed Sep 18, 2019 7:48 am

The only thing that I can think of that will make the runtime scheduled task records disappear and then reappear is if there are two servers both pointing at the same repository database but with different workspaces. Another possibility, but less likely, is that the scheduled tasks in the workspace have been copied to another path in the same workspace but have retained their runtime ids (there was a bug in the copy logic that was fixed in V5.4).

If neither of these is true, we can get some more debug information as follows:

Edit log4j.xml in UfsServer/tomcat/webapps/<webapp>/WEB-INF/classes and add:

Code: Select all

<logger name="com.ebasetech.ufs.runtime.scheduler.RuntimeScheduledTask" additivity="false">
    <level value="ALL" />
    <appender-ref ref="SYSLOG"/>
</logger>
Then restart the server.

This will write information to the standard log files and will show any scheduled tasks being deleted or added.
0 x

ericb
Ebase User
Posts: 82
Joined: Fri Jan 15, 2016 2:34 pm

Re: Weekly scheduled task suddenly running daily

#7

Postby ericb » Thu Nov 28, 2019 3:58 pm

Just following up on this for posterity's sake; I found out today that, unbeknownst to me, someone had copied the DB connection strings for this application into one of their own, which meant there were indeed 2 applications with different workspaces using the same workflow database.

Checking the CURRENT_VERSIONS table is what finally clued me in to what was going on and which application was the culprit, as the forms from that 2nd application were listed there.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Weekly scheduled task suddenly running daily

#8

Postby Jon » Thu Nov 28, 2019 5:14 pm

Thanks for the info. I'll try and remember the current_versions table tip.
0 x


Who is online

Users browsing this forum: Google [Bot] and 9 guests