Moves creation of guest log record into API server
The log DB record was created when the task ran for the first time. This was necessary to avoid conflicts, but it caused a very shady API responses - 404 might have been a perfectly valid answer, for a moment.
The patch moves the creation into API, which, together with tak requests, can now schedule the first ran reliably.