Setting up a system to prompt for a record of my activity each hour. This PHP scrip cron job will send an email to me each hour during my normal waking hours. My iPhone has push notifications enabled for email so the phone will buzz each time it needs an update and I will simply reply to the email. This way to don’t have to actively remember to record the information. After some, I’ll be able to analyze the data and see what it reveals. This is a pretty crude system, but the key thing for me is having the system actively prompt for the data in a way that makes it easy to respond. Another thought on tuning the system. I wear a Garmin Vivofit to track physical activity and sleep. If the Vivofit would actively report when “sleep” mode has initiated, an API call to Garmin Connect could be used to determine whether or not to send the activity prompt.
The email forwards to a Gmail account and the messages were initially going into SPAM.
35 18,19,20,21,22,23,0,1,2,3,4,5,6,7,8,9 * * * /usr/local/bin/php /home/hunter92/activity_log_record_request.php
PHP script for cron job
$email = "firstname.lastname@example.org"; $subject = "ActivityLog " . date("Y-m-d h:i e"); $body = ""; $headers = "From: $email\r\n"; mail($email, $subject, $body, $headers); ?>