Re: Background Tasks
Posted in 1995
On 30 Oct 1995 JBENTSEN@news1.delphi.com wrote: > CRAIG@CHEMISTRY.CHEM.UTAH.EDU writes: > (( snip, snip )) > > What flavor of Unix and what shell are you using? You're probably > >just missing the "nohup" command which will intercept the SIGTERM(?) > >signal sent as you log off. For example: > > > nohup your_pgm 1>/dev/null 2>/dev/null & > > > --Craig (craig@chemistry.utah.edu) > > >> > >> I have a program that uses embedded sql commans and need to > >> run it as a background task. This is in C/UNIX. Now I know how to J, If you can try the at job scheduler. It copies your current environment, so be sure to cd to the right directory to prepare for running your sql or whatever, e.g. echo "isql yourdb < your.sql" | at now + 5 minutes another variant at now + 5 minutes < your_shellscript You'll get an acknowledgement if at can schedule your job. Otherwise, talk to your sysadmin to get permission for at. If at gives you the go, you can logoff or simply go on with your business. Incidentally, if you can copy your at file (usually in /usr/spool/cron/atjobs), you can use it to set up the proper environment for a cron job. Yours, Nick ********************************* Nick Nobbe, Library of Congress NLS/BPH mail: nnob@loc.gov *********************************