Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Background Task: Internal Skript is failing at every execution

Hi,

after upgrading to version 6.5.3 and the background task failing short after, I noticed the system log is being flooded every time the background task is executed. Does anyone else have the problem ?

The following two errors are present in the system log file:

[E] 2020-10-01 00:00:02 [727ms]: id:44418260 INSERT INTO [settings] ([name],[value],[id]) VALUES (N’remove_attachments_time’,604800,NULL) (at Database_driver->_after_query)
[E] 2020-10-01 00:00:02 [741ms]: id:44418260 Query took 1.14 ms (at Database_driver->_after_query)
[E] 2020-10-01 00:00:02 [752ms]: id:44418260 Database error code: 339 (at Database_sqlsrv_driver->_throw_last_error)
[E] 2020-10-01 00:00:02 [764ms]: [DatabaseException] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]DEFAULT or NULL are not allowed as explicit identity values.
at ex::raise (sqlsrv.php:149)
at Database_sqlsrv_driver->_throw_last_error (sqlsrv.php:99)
at Database_sqlsrv_driver->execute (database.php:1009)
at Database_library->query (database.php:1040)
at Database_library->insert (remove_attachments.php:194)
at Remove_attachments_job->insertInformationAboutAttachmentsRemoveTime (remove_attachments.php:165)
at Remove_attachments_job->changeInformationAboutAttachmentsRemoveTime (remove_attachments.php:78)
at Remove_attachments_job->init (jobs.php:49)
at jobs::create (tasks.php:83)
at Tasks_controller->_process_job (tasks.php:69)
at Tasks_controller->_run (tasks.php:50)
at Tasks_controller->index (:)
at call_user_func (controller.php:126)
at Controller->_invoke_cli (controller.php:116)
at Controller->_invoke (gizmo.php:107)
at require_once (index.php:114)
at require_once (task.php:51)

[E] 2020-10-01 00:05:02 [530ms]: id:10840067 INSERT INTO [settings] ([name],[value],[id]) VALUES (N’remove_attachments_time’,604800,NULL) (at Database_driver->_after_query)
[E] 2020-10-01 00:05:02 [541ms]: id:10840067 Query took 1.12 ms (at Database_driver->_after_query)
[E] 2020-10-01 00:05:02 [550ms]: id:10840067 Database error code: 339 (at Database_sqlsrv_driver->_throw_last_error)
[E] 2020-10-01 00:05:02 [560ms]: [DatabaseException] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]DEFAULT or NULL are not allowed as explicit identity values.
at ex::raise (sqlsrv.php:149)
at Database_sqlsrv_driver->_throw_last_error (sqlsrv.php:99)
at Database_sqlsrv_driver->execute (database.php:1009)
at Database_library->query (database.php:1040)
at Database_library->insert (remove_attachments.php:194)
at Remove_attachments_job->insertInformationAboutAttachmentsRemoveTime (remove_attachments.php:165)
at Remove_attachments_job->changeInformationAboutAttachmentsRemoveTime (remove_attachments.php:78)
at Remove_attachments_job->init (jobs.php:49)
at jobs::create (tasks.php:83)
at Tasks_controller->_process_job (tasks.php:69)
at Tasks_controller->_run (tasks.php:50)
at Tasks_controller->index (controller.php:126)
at Controller->_invoke_cli (controller.php:116)
at Controller->_invoke (gizmo.php:107)
at require_once (index.php:114)
at require_once (task.php:51)

@Jteve_Sobs

Hey,

If you’re still facing this issue, could you please write to us at contact@gurock.com ?

Regards,
Shanu

Hi,
thanks for your reply.
I already contacted contacted support but eventually solved it myself.
I recreated the task and copied the task.php file again into the folder and now it works.
Best regards

@Jteve_Sobs

Thanks, sounds good! Please let me know in case any further questions come up, happy to help.

Regards,
Shanu