• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Run Long Jobs in Background on Linux

October 17, 2025 by Webhead

To run long running jobs on linux and not have to be logged in, do the following:

1. Start a new screen session

screen -L -S longjob

2. Run your long-running command

This will allow you to see the output of the command while it’s also written to a log file

your-command --with --args |& tee -a ~/longjob.log

3. Detach and leave it running

Ctrl + A then D

4. Log out safely

exit

5. Reattach later

screen -r longjob

6. When you’re done

Ctrl + D

Filed Under: Uncategorized Tagged With: linux

Primary Sidebar

Topics

apache apple bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery kinsta linux localization mac os x ms sql mysql open source optimize php php 7.2 svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized