I've been wrestling with this for a while on 7.x-1.0+7-dev

When I run cron from Admin as my user, all scheduled posts get published normally. When run from crontab as anonymous, posts do not publish and this shows up in my logs:

action 02/25/2013 - 17:52 Saved Blog Post test Anonymous (not verified)
action 02/25/2013 - 17:52 Set Blog Post test to unpublished. Anonymous (not verified)
action 02/25/2013 - 17:52 Set Blog Post test to published. Anonymous (not verified)
scheduler 02/25/2013 - 17:52 blog_post: scheduled publishing of test. Anonymous (not verified) view

It looks like scheduler does it's thing, but there is an action setting the post back to unpublish and saving (even though I have not scheduled an unpublish action).

Any ideas / help would be greatly appreciated!

Comments

Title:Scheduler does not publish scheduled posts.Content published during cron is immediately unpublished before saving
Priority:Major» Normal

Hi Kevin,
That's an interesting problem. Yes it does seem that scheduler is doing the right thing, at least initially. Notice that if scheduler was instigating the unpublishing then there would be another scheduler row before the unpublish action. Although there is only one save action, so it is all being done in the same operation.

Do you have anything else which controls actions and could fire off an 'unpublish' action - in particular if the user is anonymous? This would match up with your observations that it works fine if you manually run cron as an admin user.

I've chnaged the title to more accurately reflect the problem. Also hope you don't mind but I have downgraded the priority to normal. It is clearly not a bug which affects everyone using scheduler, but it is some kind of interaction betweem scheduler and your setup/modules.

Jonathan

Status:Active» Closed (works as designed)

Thanks Jonathan for updating this.

It turns out I do have a rule that unpublishes content if a user does not belong to a certain role (to prevent users from publishing without administrator / editor approval).

I had not connected this to the cron tasks of Scheduler, but it does make sense that since an update is being performed by Anonymous that the rule would be triggered.

Thanks for the attention and sorry to cause a fuss over a non-issue!

No problem Kevin, pleased to help. Glad you got it sorted.
Jonathan