How can I schedule a rule to always be run at a specific hour of the day? I have a rules component that sends me an e-mail containing a view that contains certain statistics about my site.

I'd like to have this e-mail sent at midnight every day.

The rule looks like this:

Component: Action set


Send e-mail
Schedule the component again for evaluation (+1 day)


I then triggered the rule manually at midnight and waited for it to evaluate again.  This worked for the first several days but now the e-mail is arriving at 3 or 4 in the morning instead of at midnight.  I really want the e-mail to be sent at the same time every day (or as close to the same time as possible every day).  Is there a way to do this?
How about this: 

When you're setting the time in the "Scheduled Evaluation Date" section, change it from 'Direct input' to 'Selection mode', and scroll down to where it gives you the option for 'PHP Evalution'

Paste in the following:

&lt;?php
$midnight = strtotime('midnight');
echo date("Y-m-d h:i:s", $midnight);
?&gt;


This should return something like '2013-03-25 12:00:00' // That's what it's returning for today!

You have to include the php brackets.  The strtotime() function should return back midnight of the current day, so it should work for you. I'm thinking since this is based on your cron running, it will not be exact and this should evaluate a little past midnight and 'midnight of the current' day should be exactly what you need.  Maybe you can find a php tweak that makes this better...

Anyway, let us know if that works!