perform action if user is not logged in for 24 hours
It is sending every hour because cron is running every hour, and the user has not yet logged in to change the timestamp. There is no check to see if the email has been sent, or when it was sent.

You can either update the user's timestamp to $now, which will stop the email from being sent for the next 24 hr., or set a flag on the account to say that an email has been sent.