Table of Contents
Using Cron Jobs
If you are running BTTN on a UNIX system, macOS, or Linux, you can use a cron job to run BTTN automatically. If you open a terminal on your system, and type crontab -e you will be able to edit your crontab, which can run tasks automatically. If you're greeted with an editor that you don't understand or have trouble using the editor that opens up, on Linux and macOS you can enter export EDITOR=/usr/bin/nano to change the editor to a more user-friendly interface. Once you have cron open in an editor that works for you, you will want to enter this at the bottom of the file* * * * * java -jar <full path to jar file> -config <full path to JSON config file>. This will run BTTN every minute using your JSON config file. you can change the * to something different to have the program run less frequently if you'd like. Here is an easy calculator to help you determine what to enter for how often you want BTTN to run. I recommend having the program run every minute, for the most up-to-date notifications.
Using Task Scheduler
If you're running BTTN on a windows system Task Scheduler is your best bet. To start open up Task Scheduler from the start menu. Once open, make sure Task Scheduler (local) is selected and click on Create Basic Task in the right menu bar. Then a box you should open. Enter a name for the task and click Next. On the trigger screen select how often you want BTTN to run, I recommend daily, we will make it run more than once a day later than click Next. Skip over the Trigger Daily screen. On the Action screen click Start a Program. In the program/script box click browse and find where Java is installed, either under Program File or Program Files (x86). After finding Java, in the arguments box start with -jar and then the full path to your JAR file. After the path to your BTTN jar file enter '-config' then the path to your JSON config file. Finally, click Finish. Now we need to find the task we just created and edit it. Once in your properties for the task, go to the Triggers tab and click Edit. Click the box next to Repeat task every and enter how often you want BTTN to run, you can manually change the number by typing it in. After that click OK and go back to the General tab. Make sure the radio button next to Run whether the user is logged in or not is selected.