I'm writing an extension for google chrome, the point of which is to post some data to my server with intervals (try to set intervals with cron-node, croner and default setInterval, thought that problem with it, but no). It works fine, background.js sends requests, however, if the computer was in sleep mode or turned off to standby mode, then after turning on the computer, the background.js script stops working until you restart the application. How to solve this problem, any ideas?
Manifest V3
{
"manifest_version": 3,
"name": "OP notifications",
"description": "Observe for a new msgs and notify on TG",
"version": "1.0",
"author": "GN",
"action": {
"default_popup": "html/popup.html",
"default_icon": "images/icon-32.png"
},
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"content_scripts": [
{
"js": [
"/content.bundle.js"
],
"matches": [
"example.com/*"
],
"run_at": "document_start",
"match_about_blank": true
}
],
"permissions": [
"tabs",
"activeTab",
"scripting",
"storage",
"alarms",
"notifications"
],
"host_permissions": [
"example.com/*"
],
"background": {
"service_worker": "/background.bundle.js"
}
}
try to set intervals with cron-node, croner and default setInterval, thought that problem with it, but no