The Job Queue can be used to see the current state of Transcoding, Commercial Flagging, and User Jobs. The Job Queue can be viewed with the MythWeb plugin under "Backend Status" and also in the MythTV GUI at Information Center -> System Status -> Job Queue.
Job Queue in the SQL Database
When a job is scheduled, it appears as a new row in the jobqueue table in the mythconverg database. An example of the jobqueue table (as seen in an SQL table) is shown below:
|2838||2045||2008-11-24 09:30:00||2008-11-24 21:32:48||512||0||0||1||2008-11-24 21:32:48||[BLOB - 0 B]|
|2837||2045||2008-11-24 10:30:00||2008-11-24 21:32:26||256||0||0||4||2008-11-24 21:32:26||mythbox||[BLOB - 0 B]|
|2836||2045||2008-11-24 09:00:00||2008-11-24 21:31:09||256||0||0||272||2008-11-24 21:43:37||mythbox||[BLOB - 0 B]||Successfully Completed.|
|2835||2073||2008-11-24 21:00:00||2008-11-24 21:00:03||2||0||2||4||2008-11-24 21:45:12||mythbox||[BLOB - 0 B]||74% Completed @ 37.0136 fps.|
The type corresponds to the type of job that is in the Job Queue. Based on the above examples (compiled from starting several jobs in MythTV 0.20) the following list of types and their meanings has been created:
|256||User Job 1|
|512||User Job 2|
Also, the status is updated by the backend, as well as the hostname. The meaning of status is as follows:
|4||Running (Commercial Flagging provides additonal information while running)|
Furthermore, a job can be added to the queue not only through the MythTV user interface but also directly via MySQL insertion:
INSERT INTO `mythconverg`.`jobqueue` ( `id` , `chanid` , `starttime` , `inserttime` , `type` , `cmds` , `flags` , `status` , `statustime` , `hostname` , `comment` ) VALUES ( NULL , '2045', '2008-11-24 09:30:00', NOW( ) , '256', '0', '0', '1', NOW( ) , '', '' );
There are 4 customizeable jobs you can have in the job queue. These can be configured by running mythtv-setup. In mythfrontend, you can then configure myth to allow specific jobs to run on the host, as well as configure those jobs to run.
A custom job is simply a command that will be invoked after recording. For example, invoking ffmpeg to transcode your recording to a flash video file (FLV) for online streaming. The commands can be parameterized by using special keywords in the command. The keywords are in the form %WORD% and the job queue process will substitute in the appropriate values.
See more details about User Jobs.
The below is a list of recognized keywords based on the 0.20 source.