How to write a shell script to execute a database query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akilageethal
    New Member
    • Oct 2007
    • 6

    #1

    How to write a shell script to execute a database query

    I am going to run a cron job to get a query executed daily.
    So i want to write a shell script for the cron job. What is the best way of doing that.??
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by akilageethal
    I am going to run a cron job to get a query executed daily.
    So i want to write a shell script for the cron job. What is the best way of doing that.??
    1) Figure out the command line call that will execute your query.
    2) Put that command in a shell script.
    3) Add a reference to that file in your cron configuration.

    Comment

    Working...