Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

crontab execute shell script

# Script musts start with:
#!/bin/sh
# Allow execute grant on it
chmod +x /bin/sh/myscript.sh
# Edit crontab:
crontab -e							# open user crontab in edit mode
i      								# for insert.  Make your changes
0 2 * * * /bin/sh myscript.sh     	# plan it daily at 2am for example
:wq!   								# quit and save
Source by superuser.com #
 
PREVIOUS NEXT
Tagged: #crontab #execute #shell #script
ADD COMMENT
Topic
Name
4+8 =