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?
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.
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?
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.
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
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
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?
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
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.
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
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