Skip to content
This repository was archived by the owner on Feb 19, 2021. It is now read-only.

Latest commit

 

History

History
executable file
·
37 lines (26 loc) · 1.47 KB

File metadata and controls

executable file
·
37 lines (26 loc) · 1.47 KB

OTStatusCheck

This will help you set up a cron job that triggers a script everyday at 8am that will notify you of current system load and memory usage. You will receive a Push notification whenever ever the script completes or fails. If the script does fail, the notification will include log statements to identify the issue.

Note: Adjust the cronjob listed below if you do not want notified with system information every day.


Install the 'Notify My Device' app from the app store and install it onto your mobile device.

Navigate to https://www.notifymydevice.com/ and create an account. Go to 'My applications' and create an application. Copy the API key and save it for later.

On your node:
Install npm, nodejs

  • sudo apt install npm
  • sudo apt install nodejs

Edit your environment variables inside of your directory and add your API key and change your node name.

  1. Sudo nano .env
  2. Paste and edit the variables below

APIKEY="myapikey"
NODENAME="my node name"

Add a Cron job to the bottom of your crontab to trigger the script. Test running the command before adding it to your crontab.

  1. Sudo nano /etc/crontab
  2. Edit and Paste the command below to the end of your crontab

0 12 * * * root cd ~/path/to/my/script && node status.js