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. Stop and Delete Task By Schedule

Stop and delete task by schedule

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 MNN , 13 August, 2020
Forums
Gurux.DLMS.AMI

Hello.
I start reading the attribute on a schedule using AddScheduleTarget. After the task completes successfully, I need to stop the scheduled task.
When I try to delete the schedule (using DeleteScheduleTarget ) an error occurs in ReaderService.
How to do it right?

Profile picture for user Kurumi

Kurumi

5 years 10 months ago

Hi,

Hi,

Why you do need to stop it? You can run it only once if you set execution time and don't use asterisks (*) in the date-time value.
Your value must be like this:
{
"Schedules":[1],
"Attributes":[2]
}

Where 1 is a schedule ID and 2 is an attribute ID.

BR,
Mikko

MNN

5 years 9 months ago

Hello.

Hello.
A weak communication channel is used, the task is to poll the device on a schedule. When the task completes successfully (data is received), it must be deleted (from the table GXScheduleToAttribute).
It is possible to delete a task that cannot be successfully completed within a specified time or has been unsuccessfully completed a specified number of times?

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

Hi,

Hi,

At the moment a task is marked as executed if it fails and it's not trying again.

I propose that after the reading you will go throw all the failed reads and read them again.
This makes reading faster.

BR,
Mikko

MNN

5 years 9 months ago

Hello.

Hello.
Sometimes when the tasks accumulate, the following tasks are not launched. If you clear the GxTask table, tasks are queued again. And I would still like to be able, if not to delete, then at least stop tasks that are running on schedule.

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

HI,

HI,

After the listener has accepted the task and is executing it, it's not possible to cancel it.

You can delete tasks with DeleteTask. Like this:
http://localhost:64881/api/Task/TaskDelete

Body is:
{
"Ids":[1, 2, 3, etc...]
}

BR,
Mikko

MNN

5 years 5 months ago

Hello.

Hello.
I need to start reading the attribute by schedule and reading until it is read. After that, I need to delete the required record from the GXScheduleToAttribute table, since you no longer need to read the attribute.
I use api DeleteScheduleTarget, sending the package {"Attributes": [3618], "Schedules":[4]} and an error occurs.
How can I stop the schedule?

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Gurux.DLMS.AMI
StackTrace:
at Gurux.DLMS.AMI.Reader.ReaderService.<DoWork>d__13.MoveNext() in ..\Gurux.DLMS.AMI\Reader\ReaderService.cs:line 398

Image
  • 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