Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1023715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:40:08+00:00 2026-05-16T11:40:08+00:00

i am using sos job scheduler which support many language.i accept the shell script

  • 0

i am using sos job scheduler which support many language.i accept the shell script to write jobs but i am not a shell script writer.i want to implement a following points in job scheduler:

  1. execute a shell script A. script A return “success” if time is between 6:00AM and 3PM.else it return “fail”.
  2. on “success” execute a shell script C or on “Fail” it execute shell script B.
  3. Script B and Script C send email with“Success” or “Failure” in subject line.

please help me to sortout the above discuss problem.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:40:09+00:00Added an answer on May 16, 2026 at 11:40 am

    There are two command line utilities that are helpful in this case:

    • date: Displays the current time/date in a specified format.
    • mail: Sends e-mail from the command line.

    Since we only need the full hour for our logic I use the date format “+%H” (hour from 0-23). This gives the following script basis:

    #!/bin/sh
    hour=$(date +%H)
    if [ $hour -gt 6 -a $hour -lt 15 ]; then
        echo "message body" | mail -s Success <your e-mail address>
    else
        echo "message body" | mail -s Failure <your e-mail address>
    fi
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know they're using a jQuery plugin, but I can't seem to find which
Using JavaScript, is there a way to detect whether or not an external script
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using Git Bash or MinGW Shell , if I put in a command with
I am using the <ul><li> list tag within which I have 3 tags like
Using WinDbg and SOS, I have the following: 0:011> !threads ThreadCount: 7 UnstartedThread: 0
I have a .Net application dump which captured an exception, I'm analysing using windbg
I am using SOS debug extension dll to check the memory layout of a
Using Windbg/SOS, it possible to change value of a local varible on stack? If
I'm trying to write a JPEG/JFIF encoder and decoder from scratch using C. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.