Tuesday, June 10, 2008

Start Everything "At Now"

In Solaris, you can put a process to run in background by ending the command with a &. However, your background job will be killed or terminated if you quit from your existing shell session.

In order to allow the background job to continue to run even after you exit from your shell, you need to run with nohup(1) command. All standard output and error will be redirected to nohup.out file.

If you do not like this arrangement, you may want to try at(1) command to run at a later time or even "now". By default, you can have a maximum of 4 parallel at jobs. See queuedefs(4) for the configuration details. BTW, the file is located at /etc/cron.d/queuedefs.

To submit a job to run as a background (in actual fact, it is a kind of cron job), type in your command(s) at the "at" prompt. Type control-D to finish the "at" command:

$ at now
at> /my/long/running/job.sh
at> ctrl-D
commands will be executed using /bin/bash
job 1213107087.a at Tue Jun 10 22:11:27 2008

You may want to start everything AT NOW

Labels:

0 Comments:

Post a Comment

<< Home