Two questions:
A- Which build are you running?
B- How long does the information gathering period take?
If it is almost instantaneously this is an easy fix and the following should work for you:
1- Create a new bash script and name it anything you want (extension .sh)
sudo touch yourFile.sh
2- Edit the permissions of this file to make it executable to everyone
sudo chmod a+x yourFile.sh
3- Edit your .bashrc file with the following command
sudo nano .bashrc
4- Add the following line to the bottom of .bashrc so your file will run on boot
./yourFile.sh
5- You can also add the same to your /etc/profile file - again at the bottom
. /home/pi/yourFile.sh
6- Edit your /etc/inittab file to enable autologin with the following command
sudo nano /etc/inittab
7- About 80% down the page you will need to make the following changes
Comment these two lines out:
1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
Add these two lines below them:
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
2:23:respawn:/bin/login -f pi tty2 </dev/tty2 >/dev/tty2 2>&1
8- Lastly, put the following inside the yourFile.sh file you created
#!/bin/bash
currentTime=`date +%M`
checkTime()
{
nowTime=$1
if [ $(( $nowTime % 5 )) -eq 0 ] ; then
echo `sleep 180`
echo `sudo reboot`
elif [ $(( $nowTime % 5 )) -eq 1 ] ; then
echo `sleep 120`
echo `sudo reboot`
elif [ $(( $nowTime % 5 )) -eq 2 ] ; then
echo `sleep 60`
echo `sudo reboot`
elif [ $(( $nowTime % 5 )) -eq 3 ] ; then
echo `sudo reboot`
elif [ $(( $nowTime % 5 )) -eq 4 ] ; then
echo `sleep 240`
echo `sudo reboot`
fi
}
checkTime $nowTime
The pi will reboot anywhere from XX:X3 and XX:X4 (1 to 2 minutes before your cron job is scheduled to run. The normal boot time takes about 30-40 seconds so no worries there.
You can definitely tweak the number to suit your needs.
Let me know how it works!!