Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Scheduler Is Working But Without Any Read Operations

Scheduler is working but without any read operations

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By abu3bdullah , 16 December, 2020
Forums
Gurux.DLMS.AMI

I assigned attributes of all devices to a scheduler and everything was OK. Values are read successfully and saved to DB without any problem.

But after days of correct work, although scheduler is working as per the log but without reader performing any reads !

I have this at the log:
warn: Gurux.DLMS.AMI.Scheduler.GXSchedulerService[0]
Timed Background Service is working.

But no reading is performed and no values are saved to DB. Also the "Errors" table is not containing any error records.

abu3bdullah

5 years 5 months ago

I found that Tasks are added

I found that Tasks are added without valid data:
Start and End Date are set to: '0001-01-01 00:00:00.0000000' instead of actual time of execution
and "Data : is set to Null

info: Gurux.DLMS.AMI.Startup[0]
GXSQL: INSERT INTO [GXTask] ([Object], [TaskType], [Generation], [Start], [End], [Result], [Index], [Data]) VALUES(339, 0, '20201216 20:31:00', '00010101 00:00:00', '00010101 00:00:00', NULL, 2, NULL)

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

We can't repeat this. What database you are using? What execution date-time you are using?

BR,
Mikko

abu3bdullah

5 years 5 months ago

I can't also repeat, I don't

I can't also repeat, I don't know what happened, but I have downloaded the latest version of Gurux.DLMS.AMI, it is now OK.

I am using Microsoft SQL Database Express.

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

I know the reason for this now.

Data is null because this is the reading task. Start and End times are null because that task is added to the database and the reader are not start to execute it yet. When the reader gets the task start time is set and when the reader ends the task end time is set.

BR,
Mikko

abu3bdullah

5 years 5 months ago

.

.
So, if the reader task is not executed (Need to know why ?), the task parameters will not be set and will be kept in DB with initial values.

The reader task should be executed with the scheduler, but in my case it didn't.

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

Is it possible that your reader was reading something else from the meter at that time?
The reader is asking for new tasks when the previous task finishes.

BR,
Mikko

abu3bdullah

5 years 5 months ago

After two weeks of correct

After two weeks of correct operation, I had the same problem of "NULL" data again.
GxTask table contains all scheduled tasks but with null value for Start Time, End Time, and Data columns.

And again I solved by updating to latest version and restarting the software.

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

Data is NULL because this is a read operation. That is not the case here.
Have you restarted the AMI or database server at that time or are they up and running all the time?

If this happens again can you check what is the latest reader detection time from the DB? You will find this information from the ReaderInfo table.

BR,
Mikko

abu3bdullah

5 years 5 months ago

The AMI and the Database are

The AMI and the Database are running all the time, the computer server sometimes is restarting due to power issues.

But the problem is not just for one time, it is persistent after first occurrence.
Every time the schedule starts, no reading is performed and no data values are stored.

Just having this message every time the scheduler runs:
warn: Gurux.DLMS.AMI.Scheduler.GXSchedulerService[0]
Timed Background Service is working.

But no reading is performed and no values are saved to DB. + the "Errors" table is not containing any error records.

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

From this information, it seems that the new task is added to the database, but the reader has not received it. Are you seeing "Failed to connect to the DB server." message in the output?

Are Start and End Time values NULL or are they '00010101 00:00:00'?

BR,
Mikko

abu3bdullah

5 years 5 months ago

No DB Connection Errors, I

No DB Connection Errors, I have the following log output:

GXSQL: INSERT INTO [GXTask] ([Object], [TaskType], [Generation], [Start], [End], [Result], [Index], [Data]) VALUES(339, 0, '20201216 20:31:00', '00010101 00:00:00', '00010101 00:00:00', NULL, 2, NULL)

And the values stored in the DB for Start/End Time are the same '00010101 00:00:00'

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

Are you running Gurux.DLMS.AMI in Windows or Linux? What is your OS version?
We'll create a new collector with your environment after you have sent this info.

BR,
Mikko

abu3bdullah

5 years 5 months ago

Hi,

Hi,

OS: Windows 10 Pro
SQL Server Express 2019 with Advanced Features

abu3bdullah

5 years 4 months ago

Hi,

Hi,

Any updates about this problem, I am still having it.
I have sent to your Email log file for the output of the Gurux.AMI software.

Regards

Yaro

4 years 3 months ago

Hi,

Hi,
You can reproduce this issue, by killing the service before the task finishes execution.
When you start the service again, TaskController->GetNextTask finds tasks still in progress:
SELECT GXObject.DeviceId FROM GXTask INNER JOIN GXObject ON GXTask.Object=GXObject.Id WHERE GXObject.Removed = '0001-01-01 00:00:00' AND GXTask.Start <> '0001-01-01 00:00:00' AND GXTask.End = '0001-01-01 00:00:00'
Scheduler enqueues new tasks, but the reader service still waits for the execution of tasks already started by the previous instance of the service.
I think it is necessary to add an additional condition in the query, for example, Generation or Start timestamp greater than the timestamp memorized when the service is starting to avoid processing tasks of the previous instance. Another resolution would be, marking unfinished tasks at the start of the service as finished.

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi Yaro,

Hi Yaro,

Thank you for this clear example. We'll try if we can repeat it like this.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin