Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to edit crontab in linux

Step 1 : crontab -e
Step 2 : Select your prefered editor for the file.
Steo 3 : Add the command that you want to execute from cron and save that file.
		Example : 1 0 * * 0 rm /home/jones/*.log > /dev/null 2>&1
Step 4 : check if cron is activate using command
		crontab -l
Comment

crontab save

# As others have pointed out, the first thing is to make sure you're 
# using an editor you like.
# We're all admins here, so we all like vi (ducks, runs).

export VISUAL=vi
crontab -e
# (do some edits, finishing with ESCAPE)
:wq # ENTER
Comment

how to edit and save crontab in linux

crontab -e		# open user crontab in edit mode
i      			# for insert.  Make your changes
:wq!   			# quit and save
crontab -l		# open user crontab in read mode
Comment

linux edit crontab via script

(crontab -l 2>/dev/null; echo "*/5 * * * * /path/to/job -with args") | crontab -
Comment

PREVIOUS NEXT
Code Example
Shell :: exit docker container 
Shell :: scss You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders 
Shell :: cs50 cli50 install 
Shell :: close adb server 
Shell :: log the output of the terminal 
Shell :: how to print array bash 
Shell :: uninstall g2o 
Shell :: ubuntu 20.04 aufräumen 
Shell :: how to use https in npm install instead of ssh 
Shell :: vi replace 
Shell :: check app installed with brew 
Shell :: shell count number of columns 
Shell :: get virtual display linux 
Shell :: copy terminal settings ubuntu 
Shell :: delete ec2 from terraform 
Shell :: install composer v2 ubuntu 
Shell :: pyinstaller add files 
Shell :: bind mount on linux 
Shell :: rsync exclude empty directories 
Shell :: how to activate conda/Anaconda environment 
Shell :: mysql connect another port 
Shell :: ionic splash screen dimensions 
Shell :: deploy django site to aws 
Shell :: rmdir unix 
Shell :: git recurse submodules 
Shell :: y option in apt-get 
Shell :: create private repository github command line 
Shell :: change commit message after push 
Shell :: mv linux command 
Shell :: openjdk-17-jdk 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =