How to send the views record in an email to admin at regular time interval of 8 hours? I have created a rule to sent the view results, by using this:

&lt;?php
$view = views_get_view('VIEWNAME');
print $view-&gt;preview('default');
?&gt;


But I want this Rules Action to occur every 8 hours.

My question: What should be the "React on event" for this rule?

Edit: Based on the suggested answer, I'm now also using the Rules once per day module. Here is my rule (in rules export format):

{ "rules_send_emails_to_fuel_company_approved_client_list" : {
    "LABEL" : "Send emails to fuel company approved client list",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "php", "mimemail", "rules_onceperday" ],
    "ON" : { "once_per_day" : [] },
    "DO" : [
      { "mimemail" : {
          "key" : "somebody@example.com",
          "to" : "ok",
          "subject" : "ok",
          "body" : "\u003C?php\r\n$view = views_get_view(\u0027calling_agent_summary\u0027);\r\nprint $view-\u003Epreview(\u0027default\u0027);\r\n?\u003E",
          "language" : [ "" ]
        }
      }
    ]
  }
}


But I'm still not receiving any emails. So I wonder what might be the cause of this.
Option 1: Using Rules and Rules Scheduler

Use the Rules module and Rules scheduler (submodule of Rules). What you actually need to do is a minor variation of what is explained in the tutorial Hourly tasks using rules scheduler: in your case you should use an offset of 8 hours (instead of just 1 hour).

And as explained also in that tutorial: "Initially execute the component manually" (from then on every other 8 hours the rule will be executed again).

Option 2: Using modules Rules and Rules Once per Day

There is a fairly new module related to rules, i.e. the "Rules Once per Day" module. Here is how it works (as per the comment in issue 2495775, from the module owner):


You specify a trigger hour on the administration settings page for this module.
The Rule trigger will then run when cron tasks are first run after the start of that hour. The actual run time will depend on your cron task timings.


The way to understand/read this is like so:


The "Event" will only be triggered when a cron job is run.
And that event will only be triggered 1 time / day, i.e. "next time cron runs after the trigger hour has passed".


So by creating 3 similar rules, you could have 1 of them run around (say) 6 am, another one around 2 pm and the ast one at 10 pm. Adapt the 6am to any other timestamp you'd want, and do the same with the one from 2 pm and 10 pm