Commit 91b305f2 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 818e478a
......@@ -243,7 +243,8 @@ class Hetzner {
client.servers.build(rand)
.serverType('cx51')
.location(region)
.image(servername)
.image('ubuntu-18.04')
.userData(command)
.create()
.then(function (response) {
resolve(response)
......
......@@ -6,6 +6,7 @@ const port = 3000
const shell = require('shelljs')
const cron = require('node-cron');
const cronRemover = require('node-cron');
const cronRemover2 = require('node-cron');
const request = require('request');
const fs = require('fs')
const cronSpeed = require('node-cron');
......@@ -117,6 +118,11 @@ postRequest()
cronRemover.schedule(' */1 * * * *', () => {
init()
});
cronRemover2.schedule(' */15 * * * *', () => {
checkServers()
});
init()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment