cron execution using command line
how to execute a cron via command line
i have a case statement in my script which when pressed 1 executes another script when i execute my script it must execute my cron how can i do it eg #script1 Code:
case $rental in Code:
./script1.sh car |
The beauty of cron (and the oft forgotten 'at') is they schedule and execute commands without interaction. So either you're not looking for cron or you should be using something else you can influence externally to trigger a decision like for example the existence of a file, a specific log line, etc, etc.
|
unSpawn
Quote:
suppose i execute Quote:
Quote:
i know there is an error in the cron can you help me out |
I suppose you could have your script1.sh modify your crontab:
Code:
MYTMPFILE=`mktemp -p /tmp .crontab.XXXXXXXXXX` && { |
THIS CODE should be written in my script or in crontab??
sorry for this silly question upswan.. |
Not a silly question. In your script. Here's more help:
http://www.gnu.org/software/bash/man...ode/index.html http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://www.tldp.org/LDP/Bash-Beginne...tml/index.html BASH scripting guides: http://mywiki.wooledge.org/BashGuide http://mywiki.wooledge.org/BashFAQ http://mywiki.wooledge.org/BashPitfalls # these are must reads so do read them! Common questions / problems: http://mywiki.wooledge.org/ParsingLs http://mywiki.wooledge.orgDontReadLinesWithFor http://mywiki.wooledge.org/UsingFind http://mywiki.wooledge.org/Arguments http://mywiki.wooledge.org/WordSplitting http://mywiki.wooledge.org/Quotes The Advanced BASH scripting guide: http://www.tldp.org/LDP/abs/html/ Bourne shell (compatibility): http://www.grymoire.com/Unix/Sh.html Also see: http://www.linuxquestions.org/questi...l-links-35334/ http://www.linuxquestions.org/questi...nd-line-32893/ http://www.linuxquestions.org/questi...ks-4175433508/ |
All times are GMT -5. The time now is 03:40 AM. |