How to use and Automate functions over time
import cyberNate from 'cybernate';
const firstFunction = () => {
console.log('Function executed!');
};
const secondFunction = () => {
console.log('Function executed!');
};
cyberNate(firstFunction, 2000);
cyberNate(secondFunction, 20000);
Execute at certain time
import atTime from './atTime';
const myFunction = () => {
console.log('Function executed at target time!');
};
const targetTime = new Date();
targetTime.setDate(targetTime.getDate() + 1);
targetTime.setHours(3);
targetTime.setMinutes(30);
atTime(myFunction, targetTime);