LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Submitting a job to a server (https://www.linuxquestions.org/questions/linux-newbie-8/submitting-a-job-to-a-server-458483/)

frankie_DJ 06-26-2006 12:52 PM

Submitting a job to a server
 
Hi,

Is it possible to submit a job to a remote server and then shutdown your machine but have the job on the server still running? How do you do that?

Thanks

w3bd3vil 06-26-2006 01:15 PM

I used "screen". It worked well for me.

Gethyn 06-26-2006 01:19 PM

You could also try 'nohup'.

MensaWater 06-26-2006 01:19 PM

Yes. Many ways to do this.

Some years back someone set this up on one of our servers in its root crontab (crontab -e as the root user lets you add entries):

Code:

00 02 * * 1-6 /usr/bin/ssh remotehost "at -f /root/scripts/dmxstart.sh 03:15" >> /var/log/sync.log 2>&1
The above runs at 2 AM daily (except Sunday) on the first server from cron. The cron job opens an ssh to the remote (second server) and schedules an "at" job to run there at 3:15 AM. After 2 AM on the first server I could shut it down because the "at" job is in the remote hosts queue to be run and doesn't require interaction with the first host.


All times are GMT -5. The time now is 04:38 PM.