Results 1 to 5 of 5

Thread: cron and screen

  1. #1
    Join Date
    Apr 2008
    Location
    Malaysia
    Beans
    5

    cron and screen

    Hi all,

    I'm trying to setup a cron with screen.

    the purpose of running screen is because i want to resume to see the status of the job while it is running.

    anyone can enlighten me how i should setup my cron.
    I've tested with

    00 14 * * * screen [command]

    but the cron doesn't create a new screen.
    Last edited by Hungry_Wolf; June 7th, 2010 at 04:03 PM. Reason: problem solved

  2. #2
    Join Date
    Apr 2007
    Beans
    18

    Re: cron and screen

    Would it be enough to redirect the output to a file?
    Then you can check the file to see the current status.

    00 14 * * * [command] >> cronjob.log 2>&1

  3. #3
    Join Date
    May 2008
    Beans
    Hidden!

    Re: cron and screen

    Quote Originally Posted by Hungry_Wolf View Post
    Hi all,

    I'm trying to setup a cron with screen.

    the purpose of running screen is because i want to resume to see the status of the job while it is running.

    anyone can enlighten me how i should setup my cron.
    I've tested with

    00 14 * * * screen [command]

    but the cron doesn't create a new screen.
    You're close. I also have a program run in screen via cron. Do it like this:
    Code:
    00 14 * * * screen -d -m [command]

  4. #4
    Join Date
    Apr 2008
    Location
    Malaysia
    Beans
    5

    Re: cron and screen

    Quote Originally Posted by mobilediesel View Post
    You're close. I also have a program run in screen via cron. Do it like this:
    Code:
    00 14 * * * screen -d -m [command]
    thanks guy. it works.

  5. #5
    Join Date
    May 2008
    Beans
    Hidden!

    Re: cron and screen

    Quote Originally Posted by Hungry_Wolf View Post
    thanks guy. it works.
    You're welcome!

    Screen is so useful that you can't learn it all in a day. I'm sure I'm not yet using it to its full potential yet, either.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •