<ahref=#introductionclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Manage interactive jobs in Hilbish via Lua.</p><p>Jobs are the name of background tasks/commands. A job can be started via
interactive usage or with the functions defined below for use in external runners.</p><h3id=functionsclass=heading>Functions
<ahref=#stopclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Stops the job from running.</p><h4id=addcmdstr-args-execpathclass=heading>add(cmdstr, args, execPath)
<ahref=#addcmdstr-args-execpathclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Adds a new job to the job table. Note that this does not immediately run it.</p><h4id=all---tablea-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading>all() -> table<<ahref=/Hilbish/docs/api/hilbish/hilbish.jobs/#jobstyle=text-decoration:none>Job</a>>
<ahref=#all---tablea-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Returns a table of all job objects.</p><h4id=disownidclass=heading>disown(id)
<ahref=#disownidclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Disowns a job. This deletes it from the job table.</p><h4id=getid---a-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading>get(id) -> <ahref=/Hilbish/docs/api/hilbish/hilbish.jobs/#jobstyle=text-decoration:none>Job</a>
<ahref=#getid---a-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Get a job object via its ID.</p><h4id=last---a-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading>last() -> <ahref=/Hilbish/docs/api/hilbish/hilbish.jobs/#jobstyle=text-decoration:none>Job</a>
<ahref=#last---a-hrefhilbishdocsapihilbishhilbishjobsjob-styletext-decoration-nonejobaclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><p>Returns the last added job from the table.</p><h3id=typesclass=heading>Types
<ahref=#jobclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>The Job type describes a Hilbish job.</p><h4id=propertiesclass=heading>Properties
<ahref=#propertiesclass=heading-link><iclass="fas fa-paperclip"></i></a></h4><ul><li><code>cmd</code>: The user entered command string for the job.</li><li><code>running</code>: Whether the job is running or not.</li><li><code>id</code>: The ID of the job in the job table</li><li><code>pid</code>: The Process ID</li><li><code>exitCode</code>: The last exit code of the job.</li><li><code>stdout</code>: The standard output of the job. This just means the normal logs of the process.</li><li><code>stderr</code>: The standard error stream of the process. This (usually) includes error messages of the job.</li></ul><h4id=methodsclass=heading>Methods
<ahref=#backgroundclass=heading-link><iclass="fas fa-paperclip"></i></a></h5><p>Puts a job in the background. This acts the same as initially running a job.</p><h5id=foregroundclass=heading>foreground()
<ahref=#foregroundclass=heading-link><iclass="fas fa-paperclip"></i></a></h5><p>Puts a job in the foreground. This will cause it to run like it was
executed normally and wait for it to complete.</p><h5id=startclass=heading>start()