0

I'm looking to "Schedule a Component" in Rules using some PHP. I'm able to set a value using "values known by the strtotime() function. Like +1 day.", but I would really like to use PHP to set the value (I'm wanting to set the scheduled date to a value in another field). I understand that there is a "PHP Evaluation" area when I switch to "Data Selection" mode, but am unable to write any PHP that will work with it.

Do you have any idea?

apaderno
  • 28,547
  • 16
  • 75
  • 90
JoeMH
  • 11
  • 3

1 Answers1

0

The PHP Evaluation for Scheduled Evaluation Date expects you to return a timestamp without PHP delimiters. For example:

return strtotime('2001-03-10 17:16:18');

Note that any time in the past will trigger the rule on the next cron run.

scronide
  • 12,012
  • 3
  • 28
  • 33
  • Thanks for the comment. Will I be able to do something like $node->field;? I'm trying to use the value of another field to set the date of the scheduled event. I hope I'm explaining myself well enough. :> – JoeMH Jan 07 '13 at 22:38