10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there,
Now I'm facing error regarding running shell script via cron.
The shell script which is required to get value from database.
Below is the main part of shell script.
#/bin/bash
#connect to database(1)
db2 connect to $database user xxxx using yyyy
#set values from... (3 Replies)
Discussion started by: Rohan Kishibe
3 Replies
2. UNIX for Dummies Questions & Answers
Hi Team,
When i am running the below query manually it is giving me the right output
i.e.
export PATH=/usr/sbin:/usr/bin:/sbin:/bin:$PATH
ADMIN=abc@abc.com
CPU_HIGH=`sar|awk '{print $9}'|sort -n|head -5|sed -n 5p`
CPU_MAX=`echo "scale=3; 100-$CPU_HIGH" | bc`
CPU_LOW=`sar|awk '{print... (13 Replies)
Discussion started by: Ekamjot
13 Replies
3. Programming
Hi I am running the following script in cron tab:
#!/usr/local/bin/php
<?php
$handle=fopen('xmlfile.xml',"w");
$xmlfile= file_get_contents('http://diur-plus.2me.co.il/xml.aspx');
fwrite($handle,$xmlfile);
fclose($handle);
/*
* To change this template, choose Tools |... (1 Reply)
Discussion started by: programAngel
1 Replies
4. Shell Programming and Scripting
Hi Guys,
I do have a shell script that I scheduled to run via the cron but when the script don't run.
But when I run the script manually it does run perfectly...
What might be the problem?
Thanks. (1 Reply)
Discussion started by: Phuti
1 Replies
5. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (9 Replies)
Discussion started by: blacksteel1988
9 Replies
6. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (0 Replies)
Discussion started by: blacksteel1988
0 Replies
7. Solaris
Hi,
The following shell script runs without any problem when executed manulally.
USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1)
if
then
find /arch/AUBUAT/ -type f -mtime +0 | xargs rm
find /arch/AUBMIG/ -type f -mtime +0 | xargs rm
fi
But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies
8. Shell Programming and Scripting
cron job not running the sqlplus command in shell script but the shell script works fine from command line..
Cronjob:
5 * * * * /home/dreg/script.sh
script.sh:
#!/bin/ksh
/oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh
... (18 Replies)
Discussion started by: Ikea
18 Replies
9. UNIX for Dummies Questions & Answers
Hi Everyone,
I have written a korn shell script to shutdown my documentum docbase server and to restart it automatically on a weekly basis. My script is,
When i execute this script manually, i was able to execute it successfully without any issues. I have scheduled this script in cronjob... (1 Reply)
Discussion started by: Sheethal
1 Replies
10. Shell Programming and Scripting
I am pretty new to Unix shell scripting, but wondered if anyone could help (in layman's terms if possible!!) :)
I have a shell script which ultimately sends an alert to an email address if part of a batch of programs fails. Here's the script that sends the email:
Script: 6check.csh... (8 Replies)
Discussion started by: tjhorwood
8 Replies