{"id":15297512,"url":"https://github.com/wwade/jobrunner","last_synced_at":"2026-02-27T22:19:40.195Z","repository":{"id":36964351,"uuid":"201382180","full_name":"wwade/jobrunner","owner":"wwade","description":"Job runner with logging","archived":false,"fork":false,"pushed_at":"2025-03-13T19:24:03.000Z","size":725,"stargazers_count":6,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T13:01:41.411Z","etag":null,"topics":["azure-devops","cli-app","developer-tools","linux-shell","macosx","productivity","python-3","python27","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wwade.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-09T03:28:39.000Z","updated_at":"2025-03-13T00:53:40.000Z","dependencies_parsed_at":"2024-02-06T18:46:47.468Z","dependency_job_id":"8fcde91b-c774-4e76-b166-020feb78aa8b","html_url":"https://github.com/wwade/jobrunner","commit_stats":{"total_commits":301,"total_committers":6,"mean_commits":"50.166666666666664","dds":0.6611295681063123,"last_synced_commit":"ded8cf656a769271d6dda37e8a3650378c291054"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwade%2Fjobrunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwade%2Fjobrunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwade%2Fjobrunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwade%2Fjobrunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wwade","download_url":"https://codeload.github.com/wwade/jobrunner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794418,"owners_count":21162613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","cli-app","developer-tools","linux-shell","macosx","productivity","python-3","python27","python3"],"created_at":"2024-09-30T19:18:03.223Z","updated_at":"2026-01-29T22:10:16.605Z","avatar_url":"https://github.com/wwade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"job\n===\n\nJob runner with logging\n\n|Build Status|\n|PyPI Release|\n\nInstallation\n------------\n\nInstall system-wide:\n\n.. code:: console\n\n    $ pip install shell-jobrunner\n\nInstall just for the current user:\n\n.. code:: console\n\n    $ pip install --user shell-jobrunner\n\nUninstallation\n--------------\n\n.. code:: console\n\n    $ pip uninstall jobrunner\n\nExamples\n--------\n\n-  Run ``sleep 5`` in the background\n\n   .. code:: console\n\n       $ job sleep 5\n\n-  Run ``ls`` when the last job finishes and it passed (exit code 0)\n\n   .. code:: console\n\n       $ job -B. ls\n\n-  Run ``ls`` when last job finishes (pass / fail)\n\n   .. code:: console\n\n       $ job -b. ls\n\n-  Monitor job execution\n\n   .. code:: console\n\n       $ job -W\n       Sat Aug 10, 2019 20:48:23  No jobs running, load: 0/0/0\n\n-  Retry a job\n\n   .. code:: console\n\n       $ job --retry ls\n\nQuery Examples\n~~~~~~~~~~~~~~\n\n**NOTE** ``.`` is available as an alias to the most recently executed\njob (as in the Examples above).\n\n-  View recently executed job log file\n\n   .. code:: console\n\n       $ job ls\n       $ view `job`   # Opens the output from ls using \"view\"\n\n-  View two most recently executed\n\n   .. code:: console\n\n       $ job echo 1\n       $ job echo 2\n       $ view `job -n0 -n1`\n\n-  Query by job name\n\n   .. code:: console\n\n       $ job echo foo\n       $ job echo bar\n       $ view `job -g foo`\n\n-  Show job info by name\n\n   .. code:: console\n\n       $ job ls\n       $ job -s ls\n\nConfiguration\n-------------\n\n| The default configuration file location is ``~/.config/jobrc``, but can be\n| overridden using the --rc-file option.\n\nSample rcfile:\n~~~~~~~~~~~~~~\n\n.. code:: aconf\n\n    [mail]\n    program = mail\n    # For notifications over chat applications (like Google Chat), use chatmail as\n    # your mail program instead. \"chatmail\" must be specified rather than a differently\n    # named link to the script, else some options provided to job (such as --rc-file)\n    # will not be passed through to it.\n    # program = chatmail\n    domain = example.com\n    [ui]\n    watch reminder = full|summary  # default=summary\n    [chatmail]\n    at all = all|none|no id # default=none\n    reuse threads = true|false # default true\n    [chatmail.google-chat-userhooks]\n    user1 = https://chat.googleapis.com/v1/spaces/...\n    [chatmail.google-chat-userids]\n    # Retrieve this using your browser inspector on an existing mention of this user.\n    # It should show up as \"user/some_long_integer\" somewhere in the span's metadata.\n    user1 = \u003clong integer\u003e\n\nSystem Notifications (Systemd user service example)\n---------------------------------------------------\n\nIf you want to enable notifications when jobs finish, one way to do this is to use the --notifier\nargument.\n\n``~/.config/systemd/user/job-notify.service``:\n\n.. code:: aconf\n\n    [Unit]\n    Description=Jobrunner Notifier\n\n    [Service]\n    Type=simple\n    ExecStart=env job --notifier jsonNotify.py\n    RestartSec=30\n    Restart=always\n\n    [Install]\n    WantedBy=default.target\n\n``~/.local/bin/jsonNotify.py``:\n\n.. code:: python\n\n    #!/usr/bin/env python3\n\n    from json import load\n    import subprocess\n    from sys import stdin\n\n    cmd = [\"notify-send\"]\n    data = load(stdin)\n    rc = data.get(\"rc\", 0)\n    if rc != 0:\n        cmd += [\"--urgency=critical\"]\n    cmd += [data[\"subject\"], data[\"body\"]]\n    subprocess.run(cmd)\n\n\nHacking\n-------\n\nPrimary workflow\n~~~~~~~~~~~~~~~~\n\nIt's highly recommend to work inside a virtualenv using ``pipenv``.\n\nCreate new virtualenv and install an editable version of ``jobrunner``:\n\n.. code:: console\n\n    pipenv --three install --dev\n    pipenv run pip install -e .\n\nAutoformat the code and check linters:\n\n.. code:: console\n\n    pipenv run ./format.sh\n\nRun tests:\n\n.. code:: console\n\n    pipenv run pytest\n\nRun CI checks locally\n~~~~~~~~~~~~~~~~~~~~~\n\n| This allows you to run something similar to the azure pipelines locally using docker.\n| It will use ``PIP_INDEX_URL`` and / or ``~/.config/pip/pip.conf`` to configure a pypi mirror.\n| This will also update ``Pipfile*.lock``.\n\n.. code:: console\n\n    ./test-docker.py [--versions 2.7 3.7 3.8] [--upgrade] [--ignore-unclean]\n\n.. |Build Status| image:: https://dev.azure.com/wadecarpenter/jobrunner/_apis/build/status/wwade.jobrunner%20(azure%20native)?branchName=main\n   :target: https://dev.azure.com/wadecarpenter/jobrunner/_build/latest?definitionId=2\u0026branchName=main\n\n.. |PyPI Release| image:: https://badge.fury.io/py/shell-jobrunner.svg\n   :target: https://badge.fury.io/py/shell-jobrunner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwade%2Fjobrunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwwade%2Fjobrunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwade%2Fjobrunner/lists"}