<commit_before>const TelegramBot = require('node-telegram-bot-api');
const getCurrency = require('./src/getCurrency');
const later = require('later');

// get from Heroku config constiable
const token = process.env.token;
const channelID = process.env.channelID;
const port = process.env.PORT || 8443;
const host = process.env.HOST;

const webhook = {
	webHook: {
		port: port,
		host: host
	}
}

const bot = new TelegramBot(token, webhook);
later.date.timezone("Asia/Taipei");
// const sched = later.parse.recur().on(8, 9, 10, 11, 12, 13, 14, 15, 16, 17).hour().onWeekday();
const sched = later.parse.recur().on(0).minute().after('08:00').time().before('16:00').time();
// const sched = later.parse.recur().onWeekend().on(10).second();

console.log('app start!');

// bot send message every hours.
const instance = later.setInterval(() => {
	getCurrency((err, currency) => {
		console.log('send Message:', currency);
		bot.sendMessage(channelID, currency);
	});
}, sched);<commit_msg>fix interval schdule<commit_after>const TelegramBot = require('node-telegram-bot-api');
const getCurrency = require('./src/getCurrency');
const later = require('later');

// get from Heroku config constiable
const token = process.env.token;
const channelID = process.env.channelID;
const port = process.env.PORT || 8443;
const host = process.env.HOST;

const webhook = {
	webHook: {
		port: port,
		host: host
	}
}

const bot = new TelegramBot(token, webhook);
later.date.timezone("Asia/Taipei");
// const sched = later.parse.recur().on(8, 9, 10, 11, 12, 13, 14, 15, 16, 17).hour().onWeekday();
const sched = later.parse.recur().on(0).minute().after('08:00').time().before('18:00').time();
// const sched = later.parse.recur().onWeekend().on(10).second();

console.log('app start!');

// bot send message every hours.
const instance = later.setInterval(() => {
	getCurrency((err, currency) => {
		console.log('send Message:', currency);
		bot.sendMessage(channelID, currency);
	});
}, sched);
{'fraction_non_alphanumeric': 0.18917551846231664, 'fraction_numerical': 0.03338391502276176, 'mean_word_length': 4.834808259587021, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1301614', 'n_tokens_mistral': 718, 'n_tokens_neox': 657, 'n_words': 153}