To record an error, do the following.




1. Create an empty file.


$ vi naver_blog_cron.log

 



2. Press esc. Press :wq to save.


:wq

 



3. Modify the file permissions.


$ chmod 777 naver_blod_cron.log

 



4. 
Modify the crontab.


$ crontab -e

 



5. Enter your schedule. and  >> Type the log file path after.


45 * * * * /var/www/cron/naver_blog_cron.sh >> /var/www/log/naver_blog_cron.log 2>&1

 

[Operating time] [Operating file] >> [Log file path] 2>&1


6. Press esc. Press :wq to save.


:wq

 



7. Check the crontab list.


$ crontab -l

 




copyright (c) 2017 워크식스


+ Recent posts