From 080c9d7ff539a7a4d930e0d87f553caaef1f90b9 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 26 Apr 2018 11:45:54 -0700 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 714dbd5..df5f836 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,24 @@ Within the app directory, there is a file named, `startstop.sh`. This bash scrip When you start the application with this bash script, you can close your terminal as it will keep running in the background. Later, when you come back and want to stop it... you can just execute that file once more and it will stop the running process. Please note: It's good to test the application and your configurations using the manual process above before running this bash script. Although there is a `pseudo-channel.log` that is created within the application directory, it is easier to just view the output in your terminal window - something that won't happen when using the bash script. +## Setting Up the Generate-Daily-Schedule Cron Task + +Every day (usually at midnight) PseudoChannel needs to generate a new schedule. It will not do this automatically if the app is already running. This task triggers the `-g` flag which generates the new schedule for the following day. This method, as described below, only works when using the `startstop.sh` script. How it works is, it looks for a `running.pid` file in the channel directory which the `startstop.sh` script creates when the channel is run. If it exists, the script will stop the channel, run the `-g` flag, then restart the channel. If it doesn't exist, then the script will just run the `-g` flag without doing anything else. In both cases, the channel generates a new schedule for the upcoming day. Feel free to change the update times, just be sure to choose a time past midnight - so that the app knows if it is a weekend, or what weekday to generate a schedule for. If you usually watch PseudoChannel until 2:00am, set the update time to 3:00am in the crontab task. + +Setup a cron task: +```bash +crontab -e +``` + +...then setup your new task to trigger the included `generate_daily_sched.sh` file: +```bash +0 0 * * * cd /home/pi/channel_01 && ./generate_daily_sched.sh > /dev/null 2>&1 +``` + +This will trigger the `generate_daily_sched.sh` bash script every day at midnight. Be sure to alter the paths in the above crontab task to match your PseudoChannel's paths. + + + ## Futher Info: Features are being added to the xml but as of now there are a few. Within the XML `