I created an update task for table tx_scheduler_task: Old tasks get removed, new ones should be add.
I stumbled upon a problem in my attempt to write data to the field serialized_task_object.
$queryBuilder = $this->getDbQueryBuilder();
$queryBuilder
->insert('tx_scheduler_task')
->values(
[
'uid' => 1337,
'nextexecution' => 1337,
'serialized_task_object' => 'I_DO_NOT_KNOW_WHAT_TO_WRITE_HERE',
'lastexecution_context' => 'CLI'
]
)
->execute();
I created all new needed tasks inside development environment and copied the content to the update task for exmaple: "O:51:"TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask":10:s:9:"allTables";b:1;s:12:"numberOfDays";i: ..."
The update task just runs fine, but whatever I did I recieved the following error when I opened the module scheduler: "(1/1) TypeError get_class() expects parameter 1 to be object, bool given"
This string needs to be converted, casted to blob? Can some tell me how? I tried hex2bin, pack and read too much other things. I also looked inside typo3/sysext/scheduler/Classes/Scheduler.php but did not understand, how it is written or how to use ['serialized_task_object' => Connection::PARAM_LOB] inside my insert().
I know, that I can easily create a sql dump of tx_scheduler_task and import this inside staging or live. In this attempt I would like to use only TYPO3 update wizards.