LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   breaking long command into lines in crontab (https://www.linuxquestions.org/questions/linux-general-1/breaking-long-command-into-lines-in-crontab-838155/)

Jerry Mcguire 10-14-2010 09:49 PM

breaking long command into lines in crontab
 
How to break strings of command into multi-lines in crontab? Thanks.

e.g.

Code:

# the following is a very long a gruesome command to be run at 09:59 Monday to Friday.
59 09 * * 1-5  source $HOME/some-definitions; sh /usr/local/my/long/name/application/bin/hello $(date +\%Y\%m\%d) >>/var/log/my/long/name/application/log/hello.log


bigrigdriver 10-14-2010 09:57 PM

Put the strings of command into a shell script. When you have the script running as you want it to (manually), then set up a cron job to run that script.

Jerry Mcguire 10-14-2010 10:13 PM

That may be, but still any next-line-continue character that works in crontab?


All times are GMT -5. The time now is 01:47 AM.