1 /* Demo of an easy way to run a background job. */
3 loadfile(batch,fasl,dsk,share2);
5 /* functions are DISOWN(), SLEEP(SEC,MIN,HOURS),
6 and REMOTE%DEBUG(), which can be used to check the state of
7 a running macsyma from a different macsyma. It is hard to demo
8 this function in a Batch file though. */
10 /* First set up a WRITEFILE to store results */
12 /* next, calling the function DISOWN will set TTYOFF to TRUE and
13 DYNAMALLOC to TRUE and then disown the running macsyma.
14 The BATCH will continue though with results still going to the
16 DISOWN(); /* You might one to have your job start running later.
17 here I'll just sleep for 3 minutes. */ SLEEP(0,3);
18 /* Next do a computation */
20 for j:1 thru 5 do print (j,f(j));
22 /* Next close the writefile, naming it something useful. */
24 CLOSEFILE(BATCH,DEMCRF);
26 /* NEXT kill the job */