![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stop a process to start at system startup | larsgk | SUN Solaris | 3 | 09-21-2006 11:31 AM |
| script run timer | mark_nsx | UNIX for Dummies Questions & Answers | 2 | 10-08-2005 10:01 PM |
| Startup Process for FreeBSD? | xNYx | UNIX for Dummies Questions & Answers | 2 | 03-01-2003 09:32 PM |
| auto-startup a process | champion | UNIX for Dummies Questions & Answers | 1 | 11-20-2002 09:56 AM |
| hpux startup process, AUTO file? | yls177 | HP-UX | 5 | 11-11-2002 07:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Startup Script "run process with Timer"
Hi
I have a script that execute every X minute for checking new files in a folder and converting to pdf. Is there any way to start this script automatically on linux startup?. I use sleep function in script with infinite loop. while [ 1 -lt 2 ] do killall -u `whoami` -q soffice soffice -invisible -norestore -nofirststartwizard -nologo -headless "-accept=socket,host=localhost,port=8100;urp;" & sleep 15s find /temp/papers/ -name *^.doc | while read a; do filename=`echo "$a" | sed 's/\(.*\)...../\1/'` echo Converting $filename.doc python DocumentConverter.py "$filename^.doc" "$filename.pdf" errorcode=$? if [ $errorcode -eq 0 ]; then mv "$a" "$filename.doc" echo Successfully Convert $filename.doc fi if [ 0 -lt $errorcode ]; then echo Can not convert $filename.doc error $errorcode fi done killall -u `whoami` soffice sleep 60s done I run the above script from Terminal, it is working fine. I would like to start this process automatically on my linux startup. So I put calling my script file in /etc/rc.d/rc.local. When I reboot, OS hang on startup. I think OS is looping infinite loop of my script. How can I solve? Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|