Steps:
- Download firstbot and set that as the working directory (cd /firstbot)
- Install robotjs (npm init -y, npm install -g robotjs)
- Open bot.js in VS Code (code bot.js) or directly (nano bot.js); Ctrl + O and enter to save, Ctrl + X to exit
- Customize the time and message as needed
- Download PM2 to automate the process (npm install -g pm2)
- Create a PM2 task for the process (pm2 start bot.js --name "first-bot")
- Save the PM2 task (pm2 save)
Read more about Cron Format here: https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules Resources and help for RobotJS and PM2 are available here: https://github.com/octalmage/robotjs/wiki/Building, https://pm2.io/docs/plus/overview/