OK, for the past few weeks i have been reading around different area's such as the form api, _cron hooks etc.
At times i could see what was happening and other times... i was totally lost.
For example for the past week or so i have been working on updating schedule module to work with 4.7.
So far i have built most of the form (god, how i wish i knew about lullabots formupdater before i began this ;P)
but i have been stuck on one single issue form_set_value() (http://api.drupal.org/api/head/function/form_set_value && http://drupal.org/node/51104 ) which allows for setting values to the form elements during the _validation stage.
Naturally I read up on the above two links and implemented it the way it said. it should work, but for the life of me i cant seem to understand why it refuses to work for me.
I keep getting:
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/flk/vhosts/kolaz.techarena.co.uk/includes/form.inc on line 473I tried to get some help on irc with no luck and i even asked some people at the drupal London meeting and funnily enough we couldn't figure out how it worked. lol.
So after a nice tutorial on forms api by Robert Castelo, i think the best way curently to go ahead with editing form values during validation might be to do it in the #build stage
for those interested in understanding the form apis there is very nice tutorials on the drupal.org.uk site done by Robert.
I personally found the http://www.drupal.org.uk/node/31 very helpful.
Thats that.
Whilst i was getting stuck on that i was able to make a cron hook to allow for publishing content and have committed it.
Currently it can auto-publish views (I used a single view with 'published' set to no) and it worked fine...so once i get the forms fixed i would love it if others can give it a test run since, now, the only way to test it is to set 'send' in the schedule table to be <= time().
PS the project page for this project is @ http://drupal.org/project/view_scheduler

Comments
form_set_value() requires an
form_set_value() requires an entry from your $form object; the error you're getting suggests you're not sending that.
i am using $form
When i am originally creating the form i do the following:
// Initiliase sendtime element to be used during the validation// stage with form_set_value
$form['sendtime'] = array('#type' => 'value','#value' => 0 );
in the _validate stage i place the following code right at the bottom:
form_set_value($form['sendtime'], $send_time);an thats what is required from what i can understand...sadly it seems i am missing something