Конечно, вы можете отправить запрос обратно на ваш сервер, используя nodejs
step1: in your request method/function
// everytime you receive request, save that time in database or in a file
//get current time in milliseconds
var timeInMss = new Date().getTime()
var fs = require('fs');
fs.writeFile("/tmp/lastrequest.txt", timeInMss , function(err) {
if(err) {
return console.log(err);
}
console.log("The request time was saved!");
});
Step2:
//setup cron job running every 5 minutes
// install node-cron using command npm install --save node-cron
var cron = require('node-cron');
cron.schedule('* * * * *', () => {
console.log('running a task every minute');
//first get last request time read from file
var fs = require('fs');
fs.readFile("/tmp/lastrequest.txt", 'utf8', function(err, timedata) {
//check the time in timedata data if it is more than 5 minutes before current time, then send notification });
var http = require("http");
var options = {
host: 'youranotherserver',
port: 80,
path: '/serverpath',
method: 'POST'
};
var req = http.request(options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
});
req.write('data\n');
req.write('data\n');
req.end();