Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

crontab in linux

crontab -e						

10 * * * * /bin/sh test.sh    # every hour at 10"
0 */4 * * * /bin/sh test.sh   # every 4 hours at 0"
0 9-17 * * * /bin/sh test.sh  # every hour at 0" between 9 and 17
0 2 * * * /bin/sh test.sh     # daily at 2am
0 0 * * MON /bin/sh test.sh   # every Monday at 0am
0 0 * * 1-5 /bin/sh test.sh   # daily from Monday to Friday at 0am
0 0 * * 0 /bin/sh test.sh     # weekly on Sunday
0 0 1 * * /bin/sh test.sh     # monthly (1rst day at 0am)
0 0 1 */3 * /bin/sh test.sh   # every quarter (1st day at 0am)
0 0 1 1 * /bin/sh test.sh     # yearly (01/01)
Comment

crontab command

crontab -e						# to edit (then 'i': insert, ':wq!': save and quit)
10 * * * * /bin/sh backup.sh    # every hour at 10"
0 */4 * * * /bin/sh backup.sh   # every 4 hours at 0"
0 9-17 * * * /bin/sh backup.sh  # every hour at 0" between 9 and 17
0 2 * * * /bin/sh backup.sh     # daily at 2am
0 0 * * MON /bin/sh backup.sh   # every Monday at 0am
0 0 * * 1-5 /bin/sh backup.sh   # daily from Monday to Friday at 0am
0 0 * * 0 /bin/sh backup.sh     # weekly on Sunday
0 0 1 * * /bin/sh backup.sh     # monthly (1rst day at 0am)
0 0 1 */3 * /bin/sh backup.sh   # every quarter (1rst day at 0am)
0 0 1 1 * /bin/sh backup.sh     # yearly (01/01)
Comment

install crontab in linux

wget https://pypi.python.org/packages/47/c2/d048cbe358acd693b3ee4b330f79d836fb33b716bfaf888f764ee60aee65/crontab-0.20.tar.gz
Comment

PREVIOUS NEXT
Code Example
Shell :: how to create bootable usb on manjaro 
Shell :: copy files out of docker 
Shell :: Large files detected. You may want to try Git Large File Storage 
Shell :: install cloudinary storage command 
Shell :: install windows app powershell 
Shell :: git push heroku master everything up-to-date 
Shell :: ffmpeg join ts files to mp4 
Shell :: how to combine audio tracks ffmpeg 
Shell :: bash input 
Shell :: angular bootstrap 
Shell :: env variables list 
Shell :: refresh prometheus configuration 
Shell :: run mongodb on desktop 
Shell :: revert last merge git 
Shell :: git-hub push code 
Shell :: What is the difference between git push origin and git push origin master 
Shell :: how to install morgan in node js 
Shell :: git revert to commit 
Shell :: Failed to load module "canberra-gtk-module" 
Shell :: ubuntu make executable 
Shell :: View network transfer RX / TX (Linux) 
Shell :: angular compile cache clear 
Shell :: get serial number cmd remotely 
Shell :: download homebrew windows 
Shell :: kubernetes on windows 10 
Shell :: docker install ubuntu command line 
Shell :: generate certificate 
Shell :: bash data types 
Shell :: install aws cli version 2 
Shell :: how to un zip a file in linux command line 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =