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

change crontab editor

#run command in terminal:
select-editor

#Then select an option:
Select an editor.  To change later, run 'select-editor'.
  1. /bin/nano        <---- easiest
  2. /usr/bin/vim.tiny
  3. /bin/ed

Choose 1-3 [1]:
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 :: git rename other branch 
Shell :: git flow 
Shell :: npm install react-navigation-stack 
Shell :: git discard changes 
Shell :: powershell history file 
Shell :: execute cron.daily 
Shell :: rmdir recursive 
Shell :: flutter desktop 
Shell :: uninstall editable pip 
Shell :: git split commit into two 
Shell :: delete github repository without browser 
Shell :: git stash to checkout master 
Shell :: install moment.js 
Shell :: selenium run chhrome headless 
Shell :: mount is fstab 
Shell :: install chocolately path 
Shell :: gnu octave ubuntu 
Shell :: use linux to call via android phone 
Shell :: scp command in unix 
Shell :: how to remove docker image 
Shell :: minio client docker 
Shell :: how to create a new group in linux 
Shell :: make atom default editor in git 
Shell :: git basics 
Shell :: git not recognized 
Shell :: install windows 10 on virtualbox mac 
Shell :: install ghost cms locally help of docker 
Shell :: drop caches 
Shell :: bash print separator null character 
Shell :: ve-restore-user database only 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =