Results 1 to 4 of 4

Thread: Unix - Bash Shell Run a series of task upto a time

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Unix - Bash Shell Run a series of task upto a time

    Hi,
    This is my first post. I need to perform a series of task from a particular time to some other time. For eg, I want to start my task whenever i am running the script. And it should exit from script exactly at 9:59 AM. In between, i need to do some tasks. Can anyone help me?

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    448
    Thanks
    0
    Thanked 62 Times in 58 Posts
    Rep Power
    10

    Default

    hi,

    Code:
    until test "$(date +%F)" = "09:59:00"
    do 
       : do repeat stuff until ... 9:59 !
    done
    A problem clearly stated is a problem half solved.

  3. The Following User Says Thank You to Watael For This Useful Post:

    001neeraj (7th January 2013)

  4. #3
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,514
    Thanks
    17
    Thanked 808 Times in 511 Posts
    Rep Power
    10

    Default

    /Closed. If you need further assistance on this topic, send me PM, and I will re-open it.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  5. #4
    Junior Member
    Join Date
    Dec 2012
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by Watael View Post
    hi,

    Code:
    until test "$(date +%F)" = "09:59:00"
    do 
       : do repeat stuff until ... 9:59 !
    done
    Shall we use this for Linux Bash scripts too?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 3rd October 2012, 06:24 PM
  2. Replies: 1
    Last Post: 26th April 2011, 05:44 PM
  3. Replies: 1
    Last Post: 10th January 2010, 09:17 AM
  4. [Solved] UNIX File Descriptors In Bash Shell
    By raj in forum Shell scripting
    Replies: 5
    Last Post: 28th September 2009, 03:57 AM
  5. SCP with a bash shell password linux and unix servers
    By jerry in forum Networking, Firewalls and Security
    Replies: 1
    Last Post: 9th June 2007, 05:53 PM

Tags for this Thread

Posting Permissions

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