All Projects → pforret → crontask

pforret / crontask

Licence: GPL-2.0 license
Use to call scripts or URLs from a crontab file, with optional logging and webhook upon success/failure

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to crontask

node-cron-expression
Declarative functional cron expression builder
Stars: ✭ 17 (-10.53%)
Mutual labels:  crontab
aspnet-core-react-redux-playground-template
SPA template built with ASP.NET Core 6.0 + React + Redux + TypeScript + Hot Module Replacement (HMR)
Stars: ✭ 78 (+310.53%)
Mutual labels:  healthchecks
croncal
Utility to convert a crontab file to a list of actual events within a date range.
Stars: ✭ 37 (+94.74%)
Mutual labels:  crontab
xiaoniu cron
基于APScheduler二次开发,支持集群,可视化,API动态调用等等。BUG及时通知到微信,网页等等。
Stars: ✭ 53 (+178.95%)
Mutual labels:  crontab
lnmp-docker
Docker for LNMP ( Alpine Linux + PHP7 + Nginx+ Supervisor + Crontab ) 开发环境镜像
Stars: ✭ 23 (+21.05%)
Mutual labels:  crontab
Automation-using-Shell-Scripts
Development Automation using Shell Scripting.
Stars: ✭ 41 (+115.79%)
Mutual labels:  crontab
serverless-local-schedule
⚡️🗺️⏰ Schedule AWS CloudWatch Event based invocations in local time(with DST support!)
Stars: ✭ 68 (+257.89%)
Mutual labels:  crontab
golearn
🔥 Golang basics and actual-combat (including: crawler, distributed-systems, data-analysis, redis, etcd, raft, crontab-task)
Stars: ✭ 36 (+89.47%)
Mutual labels:  crontab
docker-healthchecks
Healthchecks Docker image
Stars: ✭ 17 (-10.53%)
Mutual labels:  healthchecks
gronx
Lightweight, fast and dependency-free Cron expression parser (due checker), task scheduler and/or daemon for Golang (tested on v1.13 and above) and standalone usage
Stars: ✭ 206 (+984.21%)
Mutual labels:  crontab
async cron
crontab for python,with asyncio
Stars: ✭ 23 (+21.05%)
Mutual labels:  crontab
crontab
在弹层界面中组合成crontab表达式,然后实时解析最近5条满足条件的时间(结果),整体可当做VUE组件使用,也可将解析方法单独拎出来。
Stars: ✭ 56 (+194.74%)
Mutual labels:  crontab
crontab
cron expression parser and executor for dotnet core.
Stars: ✭ 13 (-31.58%)
Mutual labels:  crontab
node-healthchecks-api
The Node.js implementation of the Health Checks API by Hootsuite
Stars: ✭ 25 (+31.58%)
Mutual labels:  healthchecks
qinglong
支持python3、javaScript、shell、typescript 的定时任务管理面板(A timed task management panel that supports typescript, javaScript, python3, and shell)
Stars: ✭ 6,944 (+36447.37%)
Mutual labels:  crontab
mautic-zapier
Zapier JS app communicating with Mautic
Stars: ✭ 23 (+21.05%)
Mutual labels:  zapier
corona-kakao-bot
🤖 카카오톡 코로나 알리미
Stars: ✭ 17 (-10.53%)
Mutual labels:  crontab
zapier-REST-hooks
Rails engine that provides all the functionality/structure for Zapier REST hooks pattern.
Stars: ✭ 23 (+21.05%)
Mutual labels:  zapier
bashew
bash script micro-framework - from small stand-alone script to complex projects with CI/CD and testing
Stars: ✭ 139 (+631.58%)
Mutual labels:  bashew
commit-bot
Automatically generates GitHub activity
Stars: ✭ 65 (+242.11%)
Mutual labels:  crontab

bash_unit CI Shellcheck CI GH Language GH stars GH tag GH License basher install

crontask

  • Bash script to use in crontab config
  • call scripts or URLs, with optional logging
  • integration with e.g. healthchecks.io (upon success)
  • integration with e.g. zapier.com (alert upon failure)
  • output in MRTG format (in/out/server/uptime)

Usage

Program: crontask.sh 3.0.0 by [email protected]
Updated: Feb 18 23:13:34 2021
Description: run tasks/URLs in your cron
Usage: crontask.sh [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-m <minutes>] [-y <success>] [-n <failure>] [-s <shell>] [-d <dir>] [-i <icount>] [-o <ocount>] <action> <input?>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] output more [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] use this folder for log files   [default: /Users/pforret/log/crontask]
    -t|--tmp_dir <?> : [option] ise this folder for temp files  [default: /Users/pforret/.tmp]
    -m|--minutes <?> : [option] cache results for [cache] minutes  [default: 5]
    -y|--success <?> : [option] call upon success (e.g. https://hc-ping.com/eb095278-aaa-bbbb-cccc-7b75c171a6aa
    -n|--failure <?> : [option] call upon failure (e.g. https://hooks.zapier.com/hooks/catch/123456789 )
    -s|--shell <?>   : [option] use this specific shell bash/zsh  [default: bash]
    -d|--dir <?>     : [option] first cd to folder (- = derive from 1st command)  [default: -]
    -i|--icount <?>  : [option] what to output as 1st parameter: lines/words/chars/secs/msecs/head/tail  [default: msecs]
    -o|--ocount <?>  : [option] what to output as 2nd parameter: lines/words/chars/secs/msecs/head/tail  [default: lines]
    <action>         : [parameter] what to do: check/cmd/url
    <input>          : [parameter] command to execute/URL to call (optional)
                                  @github.com:pforret/crontask.git                                             
### TIPS & EXAMPLES
* use crontask cmd to run a command from crontab
  crontask cmd "/path/to/calculate_statistics this that"
* use crontask url to call a URL from crontab
  crontask url "https://.../update"
* use crontask check to check if this script is ready to execute and what values the options/flags are
  crontask check
* use crontask env to generate an example .env file
  crontask env > .env
* use crontask update to update to the latest version
  crontask check
* >>> bash script created with pforret/bashew
* >>> for bash development, also check out pforret/setver and pforret/progressbar   

🚀 Installation

with basher

> basher install pforret/crontask

call in crontab as

> /Users/[user]/.basher/cellar/bin/crontask ...

or with git

> git clone https://github.com/pforret/crontask.git
> cd crontask
> ln -s crontask.sh /usr/bin/crontask

call in crontab as

> /usr/bin/crontask ...

Output

  • MRTG format
  • 4 lines
    • icount : e.g. # msecs to execute command
    • ocount : e.g. # lines of output
    • description
    • update time

Example

> crontask cmd "ping -c 1 www.google.com"
500
6
«ping -c 1 www.google.com»: msecs lines
2021-02-19 00:28:04

> crontask url "https://blog.example.com/cron.php" 
270
127
«https://blog.example.com/cron.php»: msecs lines
2021-02-19 00:29:51           
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].