Sponsored Content
Full Discussion: Crontab assistance
Top Forums UNIX for Dummies Questions & Answers Crontab assistance Post 302448537 by alpinescott on Thursday 26th of August 2010 09:21:55 AM
Old 08-26-2010
Thank you for the responces. Here is my script. The script works and the result is a SQL query being emailed to me. I DO need that result.

Code:
    SID=$1
  DIR=/u01/prod/prodcomn/admin/scripts/specialrequests/export_icat.sql
  ORACLE_SID=$SID; export ORACLE_SID
  PATH=$ORACLE_HOME/bin:$PATH; export PATH
  cd $DIR
  sqlplus user/pwd @export_icat.sql > export_icat.csv
  mail -s "Results" email@domain < export_icat.csv
  mv export_icat.csv "`date +%m%d%Y`_export_icat.csv

export_icat is the sql query that is called to run by the script. The result of the query is saved to export_icat.csv. That file is then emailed to me.

So I should be indicating my user profile at the start of my script?
Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need Assistance

I have two questions I am struggling with... How do the programs p1, p2, and p3 need to handle their standard files so they can work like this: p1 | p2 | p3 ? What exactly is this command supposed to do? $ kill -QUIT %1 & This command below? $ sort -o emp.lst emp lst & Any... (1 Reply)
Discussion started by: yahoo14
1 Replies

2. Shell Programming and Scripting

I need an assistance

I have a school project to create a shell program same as calendar i must create a txt file with celebrations with vi i know this but the problem is i don't know awk and grep. The object of object is to create a program who read a date an appear the celebration. Can you help me please !!!... (1 Reply)
Discussion started by: mytilini boy
1 Replies

3. Shell Programming and Scripting

An urgent assistance

Hi. Does any one know when the below will print hi ? || echo hi Thanks in advance (5 Replies)
Discussion started by: kinny
5 Replies

4. Shell Programming and Scripting

Awk Assistance

Hello A friend of mine posted this on another site that I follow. It is to advanced for me to figure out. If solved I will give credit where credit is due: NOTE: Does not have to be AWK. Any Language will work, Hi. I need a little assistant to write an awk script on linux that reads a file... (12 Replies)
Discussion started by: abacus
12 Replies

5. Homework & Coursework Questions

Assistance on work

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Files stored in /bin, /sbin, /usr/bin, and /usr/sbin vary in their respective sizes. In fact, there are 244... (1 Reply)
Discussion started by: alindner
1 Replies

6. UNIX for Dummies Questions & Answers

awk o/p assistance

Hi, I would like to know the awk command that gets the below o/p: File contents: Board1;9a;60;36;60.0;60;0;0.0 Board2;96;60;35;58.3;55;0;0.0 Board3;92;60;60;100.0;60;60;100.0 Used awk script: #!/bin/awk -f BEGIN { FS = ";"; printf (" Device | ... (1 Reply)
Discussion started by: Dendany83
1 Replies

7. Shell Programming and Scripting

Need assistance with sed

Hi All, I need your assistance, I would like to replace all lines beginning with the word "begin" with the below text: Device | IPMB0-A | IPMB0-B Board Address |Sent SentErr %Errr |Sent SentErr ... (9 Replies)
Discussion started by: Dendany83
9 Replies

8. AIX

AIX 3.2.5 Assistance

I am looking for any help on locating a set of install disks or downloads of AIX 3.2.5 or earlier.. We recently lost our HDD running AIX 3.2.5 and need to reinstall but have no OS disk to complete.. Any help would be appreciated.. Thanks (4 Replies)
Discussion started by: rmsdp
4 Replies

9. Shell Programming and Scripting

Need assistance with looping

Hi, I have a find command that searches for all the .properties under current directory and its subdirectories. find . -name "*.properties" I would like to pass the output of the above find command to my "operation.sh script as the second parameter. for eg: ./operation.sh 775 ... (2 Replies)
Discussion started by: mohtashims
2 Replies

10. Shell Programming and Scripting

sed assistance

Hello everyone. I am trying to replace sprintf(buffer, "{\"id\":1,\"method\":\"mining.update_block\",\"params\":}\n", coinid, blockhash); with sprintf(buffer, "{\"id\":1,\"method\":\"mining.update_block\",\"params\":}\n", coinid, blockhash); this is the code I was trying but is... (9 Replies)
Discussion started by: crombiecrunch
9 Replies
CRONTABS(4)						      Crontabs users' Manual						       CRONTABS(4)

NAME
crontabs - configuration and scripts for running periodical jobs SYNOPSIS
run-parts [--list|--test]<directory> DESCRIPTION
Crontabs is a historical name for the run-parts script and the system crontab. The run-parts script runs all executables in the specified directory. Run-parts runs all executables in the specified directory. The execution of files can be allowed or denied by creating file jobs.allow or jobs.deny which worked similar as other allow/deny config files. The file must be created in the specified directory. --list print names of all files (not limited to executables), but don't run them. This option can't be used with test option. --test print names of files, which would be run. Randomization of jobs can be configured in the /etc/sysconfig/run-parts file. To enable randomization of jobs, set the RANDOMIZE parameter to 1 and set the RANDOM parameter to an integer which determines a random seed. Additionally, you may configure the RAN- DOMTIME parameter (again, by specifying an integer) to provide an additional level of randomization. Jobs are not randomized when the RANDOM and RANDOMTIME parameters are set to 0. Values in these two parameters must be set to 1 or larger to provide a good enough randomization. Randomization of cron jobs can be useful for shared networks, where multiple cron jobs executed at once can cause spikes in traffic, especially during daily jobs. With randomized jobs, the workload is evenly distributed throughout the day. EXAMPLE OF CONFIGURATION FILE
RANDOMIZE=1 RANDOM=4 RANDOMTIME=8 Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These jobs are now run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be installed if the jobs in these directories should be running. Refer to the anacron(8) how to limit the time of day of the job execution. EXAMPLE
/etc/cron.daily/jobs.deny could contain for example 0logwatch which forbid execution of this script. SEE ALSO
anacron(8), crontab(5) Marcela Malaova 2012-08-29 CRONTABS(4)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy