Closed (fixed)
Project:
Actions
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2007 at 03:55 UTC
Updated:
6 Nov 2009 at 15:56 UTC
I'm new to actions, but I did figure out how to create an e-mail action. I just can't seem to figure out how to schedule the email action to be executed, say 1 day from today.
I do not want this triggered by some node insertion or update because there is none necessary. I just want the e-mail action performed a day from today.
How can I do this? Can I do this?
I looked at the Schedule Actions module, but a) there is no 5.x version (well, that works) and b) It still seems to require some node insertion/update before it will trigger the action schedule action (asa).
Comments
Comment #1
somebodysysop commentedI have actions, workflow and sched_act (Scheduled Actions) installed.
As I said, I wanted to schedule an email send action for a future date, but I did not want this triggered by a node. I have a module I'm working on where I use views to create a recipient list, and it is that recipient list that I want to send e-mails to at a scheduled date.
I wanted to do this programmatically. Discovered that the two hooks I needed in Scheduled Actions, action_sched_act_asa and sched_act_cron, actually work, so I did the following:
My only problem now is to figure out how to programmatically delete the email actions once they are sent. Any solutions for that?
Comment #2
jefkin commentedHow very Meta!
This is where the books often say, "... is left to the reader as an exercise."
My suggestion (as a coder, but not one who's fooled around with actions or scheduled actions in drupal before) is, make a mod to the sched_action table with a new boolean (or tinyint) field that marks fire once events. These events would be pruned by sched_action every 12 hours, say when the marked row entry is 1 day expired.
The default for the table column should be false, and must be set to true explicitly, prossibly meaning a modification to actions_save.
Jeff
Comment #3
somebodysysop commentedWhat I ended up doing in views_mail is creating a second action: Delete the email action, and using cron to run and execute it. Works like a charm.
Comment #4
jefkin commented