Use Witty Pi to Make Repeatable Schedules for Auto Startup and Shutdown Your Raspberry Pi
Many customers wish to use Witty Pi to make repeatable schedule for auto startup and shutdown their Raspberry Pis. This was not supported in the initial version of Witty Pi software, and now it is possible.
Since V1.50, Witty Pi software accepts “??” as wildcard while inputting the schedule time. This makes repeatable scheduling possible. To use this new feature, you need to make sure you have version 1.50+ installed.
Install or Upgrade to V1.50 Software
If you are new to Witty Pi, you will get latest software by running the installing script and no need to upgrade.
sudo sh installWittyPi.sh
If you have ever installed the old version of software, you can remove or rename the “wittyPi” directory and then run the installing script again (so new version will be downloaded and installed).
mv wittyPi wittyPi_bak
sudo sh installWittyPi.sh
If you run “sudo ./wittyPi.sh” and see the correct version number shows up, you are on the right track.
Make Repeatable Schedule
Since version 1.5, Witty Pi’s software can accept “??” as the wildcard while inputting the time for auto startup/shutdown. You can use “??” to replace dd (the day), HH (the hour) and MM (the minute) in the time you input, but you must follow the two rules below:
- The first wildcard (??) must show up on the very left of the time you input.
- If there are more than one wildcards, no number should be placed between them.
The reason why these rules exist is the hardware limitation of the RTC chip, which doesn’t support all possible combinations. Actually only a few patterns are supported, and the table below lists all of them:
It doesn’t make sense to put wildcard on SS (the second) field, as your Raspberry Pi could not get startup or shutdown within a second. If you put “??” on SS field, Witty Pi will correct it to “00” instead.
If you input a pattern that is not listed in the table above, say “?? 12:??:00″ for auto startup, it is not supported. However Witty Pi software will automatically change it to a supported pattern. In this example, it will set the auto startup time to “?? ??:??:00″. You will see the message on the console, when Witty Pi makes such kind of adjustments.
Setting “?? 23:30:00″ as auto startup time will wake up your Raspberry Pi at 11:30 PM everyday.
Setting “?? ??:00:00″ as auto startup time will wake up your Raspberry Pi on every hour.
Setting “?? 05:00″ as auto shutdown time will turn off your Raspberry Pi at 5:00 AM everyday.
Setting “?? ??:00″ as auto shutdown time will turn off your Raspberry Pi on every hour.
If you want to play something excessive, you can set auto startup time to “?? ??:??:30″ and auto shutdown time to “??:??:??”. As a result, your Raspberry Pi will keep starting up and then shutdown, and it never ends (I guess you know why :-)). If you want to stop it, unplug the power supply when your Raspberry Pi is off, and then remove the battery on your Witty Pi. After a minute you can put the battery back and Witty Pi will forget your previous settings.
By using the wildcard, you can make daily, hourly and minutely schedule for auto startup and shutdown. Although only a few patterns are supported, repeatable scheduling is a very useful to Witty Pi users. By regularly startup and shutdown your Raspberry Pi, you keep your Pi running only when it is necessary, and save a lot of power consumption. It will be significant when you are powering your project with battery.