I create a rule whit scheduler, but when it is execute by cron, doesn't runs and in reports i can see this message:

Notice: unserialize(): Error at offset 23 of 26 bytes en RulesSchedulerDefaultTaskHandler->runTask() (línea 30 de C:\mywebsite\sites\all\modules\rules\rules_scheduler\includes\rules_scheduler.handler.inc).

This drupal is running in iis + postgres 9.3

Comments

fago’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Not sure what should be different with postgres here, I guess it would need more debugging. Can you dive in and provide more infos?

Maybe related #1627174: Error in rules Scheduler module on PostgreSQL

jlsevillano’s picture

I tested the same with MySql, same modules, same rules, same process and with mysql it works right, but if the database is postgress, rule doesn't runs right.

I create a component, if node type is type A, then set value (set value in field_estado to pendent). OK, after that i create a rule:after save a new node type A create: Schedule component evaluation. when cron runs it try to execute rule/component and appears:

Notice: unserialize(): Error at offset 23 of 26 bytes in RulesSchedulerDefaultTaskHandler->runTask() (line30 de C:\mywebsite\sites\all\modules\rules\rules_scheduler\includes\rules_scheduler.handler.inc

Rule doesn't runs :(

jlsevillano’s picture

Rule:

{ "rules_fijar_caducidad_de_estado" : {
"LABEL" : "Fijar caducidad de Estado",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "rules_scheduler" ],
"ON" : { "node_insert--oferta" : { "bundle" : "oferta" } },
"DO" : [
{ "schedule" : {
"component" : "rules_cambio_estado_oferta",
"date" : [ "node:field-fecha" ],
"identifier" : "Planificado Cambio estado [node:title]",
"param_oferta" : [ "node" ]
}
}
]
}
}

Component

{ "rules_cambio_estado_oferta" : {
"LABEL" : "Cambio Estado Oferta",
"PLUGIN" : "rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"USES VARIABLES" : { "oferta" : { "label" : "Oferta", "type" : "node" } },
"IF" : [
{ "node_is_of_type" : { "node" : [ "oferta" ], "type" : { "value" : { "oferta" : "oferta" } } } }
],
"DO" : [
{ "data_set" : { "data" : [ "oferta:field-estado" ], "value" : "pendiente" } }
]
}
}

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This appears to be a duplicate of #1627174: Error in rules Scheduler module on PostgreSQL - there is a solution in that issue, see #1627174-18: Error in rules Scheduler module on PostgreSQL