Flag a content with Scheduler Flag a node using scheduler &amp; Rule. But not getting the way how to achieve that.

Scenario:


I have a Content type "xxx" and I have set a flag with this content type.
So, whenever a user creates a content,I want to use scheduler so that user can specify at which particular date &amp; time it should be flagged.

(Scheduler provides when to publish and unpublish content,I want to Flag the content)

Let me know if anyone having any idea about this.


Thanks in advance.
I know it was not that difficult but I was not getting the actual thing how to achieve it but now it is working for me.

Things to do:


Go to your /admin/config/workflow/rules/components and click on "Add new Component"
Select "Action set" under Component plugin &amp; Press Continue.
Give appropriate Name.E.g: Flag Node.

Data type : Content, Label: Node, Machine name:node &amp; Press Continue.
Click on "Add action"  &amp; select "Flag a node" ,once it returns the result data,Select which flag should be clicked.

For => node :Data selector use node &amp;

For =>User on whose behalf to flag : Data selector use node:author

&amp; Press Save.

Done with the component.

Now Add a New Rule
Go to your /admin/config/workflow/rules and click on "Add new Rule"
Give appropriate Name.E.g: Flag Node Rule.

React on event : After updating existing content. (as you need)

&amp; Press Save
You can add conditions if you want whether it should be published or should belong to any content type or what so ever you need.
I have used Content is of type.
This is the thing which works like a magic to schedule your event(Here Flag).
Click on "Add action" &amp; Select "Schedule component evaluation" under Rule Scheduler

&amp; Select the Component Value ** as (**Flag Node) which we created just before configuring this rule &amp; Press Continue.
Enter Scheduled evaluation date which will schedule your event when to get triggered. 

Data selector :(Enter Your values as +2 minutes, +2days, +2 weeks etc as your need)
Identifier => Value : [node:title] has been Flagged.(You can use any message you want to see on /admin/config/workflow/rules/schedule along with list of scheduled events.)
Node => Data selector : node 

&amp; Press Save.

Done with the Rule.


Configuration is done. You can test it now.

But please have a look into this. I was not checking such thing so was not able to see the result.
Your event will respond you only after the cron run because it is executed by the cron. The cron triggers a query to check whether something should be published or flagged.If your cron runs every hour and you want something published on 22:35 and it is past that time it will be actually published the next time your cron runs. So if your cron runs at 22:30 and 23:30 the publish will be at 23:30.

Hope this will be helpful for someone.