ioBroker.admin icon indicating copy to clipboard operation
ioBroker.admin copied to clipboard

Mark a deleted cronjob explicitly

Open foxriver76 opened this issue 3 years ago • 5 comments
trafficstars

In the past a deleted adapter cronjob was marked with restartSchedule: "" now restartSchedule is completely removed from the instance object, which leads to an override when installing a new version.

Expected: Mark it with an empty string again to prevent override by new adapter versions (uploads)

See https://github.com/ioBroker/ioBroker.js-controller/issues/1879

foxriver76 avatar Jun 08 '22 09:06 foxriver76

@foxriver76 Can we close this issue?

Feuer-sturm avatar Jun 23 '22 18:06 Feuer-sturm

Can you verify that it is fixed?

foxriver76 avatar Jun 23 '22 20:06 foxriver76

@foxriver76 No :-). I hoped you are able to verify this.

Feuer-sturm avatar Jun 23 '22 20:06 Feuer-sturm

Testing which needs to be done:

  1. Add an adapter which has a cronjob enabled by deafult. Like https://github.com/ioBroker/ioBroker.openweathermap/blob/5c7dac007fe726926bd0b739ef9dd9a3854898d8/io-package.json#L138
  2. then delete the schedule via admin interface.
  3. Then upload the adapter iob u openweathermap
  4. check that schedule stays deleted

foxriver76 avatar Jul 25 '22 11:07 foxriver76

@GermanBluefox @foxriver76

Admin 6.2.4 I executed the steps from @foxriver76 with coronavirus-statistics adapter.

After deleting the schedule in admin the following error was written in the log "2022-07-25 22:16:39.100 - error: host.ioBrokerTestsystem system.adapter.coronavirus-statistics.0 schedule attribute missing"

Executing proxmox@ioBrokerTestsystem:~$ iob upload coronavirus-statistics made a successfull upload and the cron job was set once again. See log file.

2022-07-25 22:15:22.530 - info: coronavirus-statistics.0 (4381) Terminated (ADAPTER_REQUESTED_TERMINATION): All data handled, adapter stopped until next scheduled moment
2022-07-25 22:15:23.106 - info: host.ioBrokerTestsystem instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
2022-07-25 22:16:35.965 - info: host.ioBrokerTestsystem stopInstance system.adapter.coronavirus-statistics.0 (force=false, process=false)
2022-07-25 22:16:35.967 - info: host.ioBrokerTestsystem stopInstance canceled schedule system.adapter.coronavirus-statistics.0
2022-07-25 22:16:39.100 - error: host.ioBrokerTestsystem system.adapter.coronavirus-statistics.0 schedule attribute missing
2022-07-25 22:17:38.597 - info: host.ioBrokerTestsystem stopInstance system.adapter.coronavirus-statistics.0 (force=false, process=false)
2022-07-25 22:17:41.743 - info: host.ioBrokerTestsystem instance scheduled system.adapter.coronavirus-statistics.0 */15 * * * *
2022-07-25 22:17:41.789 - info: host.ioBrokerTestsystem instance system.adapter.coronavirus-statistics.0 started with pid 4488
2022-07-25 22:17:45.851 - warn: coronavirus-statistics.0 (4488) Object coronavirus-statistics.0.countryTranslator is invalid: Default value has to be type "string" but received type "number"
2022-07-25 22:17:45.859 - warn: coronavirus-statistics.0 (4488) This object will not be created in future versions. Please report this to the developer.
2022-07-25 22:17:45.921 - info: coronavirus-statistics.0 (4488) starting. Version 0.8.7 in /opt/iobroker/node_modules/iobroker.coronavirus-statistics, node: v16.15.1, js-controller: 4.0.23
2022-07-25 22:17:58.706 - info: coronavirus-statistics.0 (4488) Terminated (ADAPTER_REQUESTED_TERMINATION): All data handled, adapter stopped until next scheduled moment
2022-07-25 22:17:59.382 - info: host.ioBrokerTestsystem instance system.adapter.coronavirus-statistics.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)

Feuer-sturm avatar Jul 25 '22 20:07 Feuer-sturm

ok with Admin 6.2.16

Feuer-sturm avatar Aug 18 '22 22:08 Feuer-sturm