I have created a rule to sent the view results, by using this:
<?php
$view = views_get_view('VIEWNAME');
print $view->preview('default');
?>
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" : "[email protected]",
"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.