{"id":13587724,"url":"https://github.com/pforret/crontask","last_synced_at":"2026-04-02T15:59:42.868Z","repository":{"id":144772115,"uuid":"44732442","full_name":"pforret/crontask","owner":"pforret","description":"Use to call scripts or URLs from a crontab file, with optional logging and webhook upon success/failure","archived":false,"fork":false,"pushed_at":"2021-12-21T21:06:20.000Z","size":428,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-14T21:56:07.437Z","etag":null,"topics":["bashew","cron-script","crontab","crontask","healthchecks","mrtg","zapier"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pforret.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2015-10-22T08:33:16.000Z","updated_at":"2024-08-01T16:33:45.902Z","dependencies_parsed_at":null,"dependency_job_id":"dc130b0b-1c80-45a5-a89d-e7c1f7b9a37e","html_url":"https://github.com/pforret/crontask","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fcrontask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fcrontask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fcrontask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fcrontask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pforret","download_url":"https://codeload.github.com/pforret/crontask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243500,"owners_count":21071054,"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":["bashew","cron-script","crontab","crontask","healthchecks","mrtg","zapier"],"created_at":"2024-08-01T15:06:20.018Z","updated_at":"2026-04-02T15:59:42.812Z","avatar_url":"https://github.com/pforret.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"![bash_unit CI](https://github.com/pforret/crontask/workflows/bash_unit%20CI/badge.svg)\n![Shellcheck CI](https://github.com/pforret/crontask/workflows/Shellcheck%20CI/badge.svg)\n![GH Language](https://img.shields.io/github/languages/top/pforret/crontask)\n![GH stars](https://img.shields.io/github/stars/pforret/crontask)\n![GH tag](https://img.shields.io/github/v/tag/pforret/crontask)\n![GH License](https://img.shields.io/github/license/pforret/crontask)\n[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash\u0026style=flat)](https://basher.gitparade.com/package/)\n\n# crontask\n\n![](assets/crontask.jpg)\n\n* Bash script to use in crontab config\n* call scripts or URLs, with optional logging\n* integration with e.g. healthchecks.io (upon success)\n* integration with e.g. zapier.com (alert upon failure)\n* output in MRTG format (in/out/server/uptime)\n\n## Usage \n```\nProgram: crontask.sh 3.0.0 by peter@forret.com\nUpdated: Feb 18 23:13:34 2021\nDescription: run tasks/URLs in your cron\nUsage: crontask.sh [-h] [-q] [-v] [-f] [-l \u003clog_dir\u003e] [-t \u003ctmp_dir\u003e] [-m \u003cminutes\u003e] [-y \u003csuccess\u003e] [-n \u003cfailure\u003e] [-s \u003cshell\u003e] [-d \u003cdir\u003e] [-i \u003cicount\u003e] [-o \u003cocount\u003e] \u003caction\u003e \u003cinput?\u003e\nFlags, options and parameters:\n    -h|--help        : [flag] show usage [default: off]\n    -q|--quiet       : [flag] no output [default: off]\n    -v|--verbose     : [flag] output more [default: off]\n    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]\n    -l|--log_dir \u003c?\u003e : [option] use this folder for log files   [default: /Users/pforret/log/crontask]\n    -t|--tmp_dir \u003c?\u003e : [option] ise this folder for temp files  [default: /Users/pforret/.tmp]\n    -m|--minutes \u003c?\u003e : [option] cache results for [cache] minutes  [default: 5]\n    -y|--success \u003c?\u003e : [option] call upon success (e.g. https://hc-ping.com/eb095278-aaa-bbbb-cccc-7b75c171a6aa\n    -n|--failure \u003c?\u003e : [option] call upon failure (e.g. https://hooks.zapier.com/hooks/catch/123456789 )\n    -s|--shell \u003c?\u003e   : [option] use this specific shell bash/zsh  [default: bash]\n    -d|--dir \u003c?\u003e     : [option] first cd to folder (- = derive from 1st command)  [default: -]\n    -i|--icount \u003c?\u003e  : [option] what to output as 1st parameter: lines/words/chars/secs/msecs/head/tail  [default: msecs]\n    -o|--ocount \u003c?\u003e  : [option] what to output as 2nd parameter: lines/words/chars/secs/msecs/head/tail  [default: lines]\n    \u003caction\u003e         : [parameter] what to do: check/cmd/url\n    \u003cinput\u003e          : [parameter] command to execute/URL to call (optional)\n                                  @github.com:pforret/crontask.git                                             \n### TIPS \u0026 EXAMPLES\n* use crontask cmd to run a command from crontab\n  crontask cmd \"/path/to/calculate_statistics this that\"\n* use crontask url to call a URL from crontab\n  crontask url \"https://.../update\"\n* use crontask check to check if this script is ready to execute and what values the options/flags are\n  crontask check\n* use crontask env to generate an example .env file\n  crontask env \u003e .env\n* use crontask update to update to the latest version\n  crontask check\n* \u003e\u003e\u003e bash script created with pforret/bashew\n* \u003e\u003e\u003e for bash development, also check out pforret/setver and pforret/progressbar   \n```\n\n## 🚀 Installation\n\nwith [basher](https://github.com/basherpm/basher)\n\n\t\u003e basher install pforret/crontask\n\ncall in crontab as\n\n    \u003e /Users/[user]/.basher/cellar/bin/crontask ...\n\nor with `git`\n\n\t\u003e git clone https://github.com/pforret/crontask.git\n\t\u003e cd crontask\n    \u003e ln -s crontask.sh /usr/bin/crontask\n\ncall in crontab as\n\n    \u003e /usr/bin/crontask ...\n\n## Output\n\n* [MRTG format](https://blog.forret.com/2015/10/13/extended-mrtg-format/)\n* 4 lines\n    * icount : e.g. # msecs to execute command\n    * ocount : e.g. # lines of output\n    * description\n    * update time\n\n### Example\n\n```bash\n\u003e crontask cmd \"ping -c 1 www.google.com\"\n500\n6\n«ping -c 1 www.google.com»: msecs lines\n2021-02-19 00:28:04\n\n\u003e crontask url \"https://blog.example.com/cron.php\" \n270\n127\n«https://blog.example.com/cron.php»: msecs lines\n2021-02-19 00:29:51           \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fcrontask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpforret%2Fcrontask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fcrontask/lists"}