variable has no value if run the script automatically/scheduled
Hi All,
I am using ksh as the shell. I have a script that should store variable after executing "onstat" on informix. I can execute it successfully without any issue if run manually, however the value is not showing up when run automatically(scheduled).
Is there anything needed to make the value assigned into PGSIZE?
here is the variable assignment i've done
===============
-------
this is the output when run manually
4096
all i want to do is to store the output into the PGSIZE variable.
all environment variables needed were setup
this is the output if executed via scheduled job.
====
bfore PAGESIZE 4096
after PAGESIZE
=====
<<<<<<<<<<<<<<<<<<<<<<<<< This should have "after PAGESIZE" should have "4096" if executed automatically.
also, just initializing hardcoded
, seems to be no problem.
Try running the command PGSIZE=`onstat -b|grep buffer` alone in your script and check the logs if all the data is dumped to the log in PGSIZE. Lets see if it is getting something. If nothing is there then try running PGSIZE=`onstat -b` and check the logs.
regards,
Ahamed
Last edited by ahamed101; 05-16-2011 at 08:34 AM..
i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Hi ! all, I have once script to remove temporary cache and temporary xml files
looks like this, as it is taking more space, I would like to run automatically every 12 hour once, and then I want to receive some log as acknowledgement
#!/bin/sh
echo "Removing logs and temp files (typically... (4 Replies)
Hi,
I want my unix script to run as a scheduled job such that the script is invoked once every 15 minutes. Is there any way to achieve this other than running the script as a cron job? (2 Replies)
Hi!
I want to run/execute a bash script automatically everytime when a specific file is created or when its timestamp changes. Is this possible? How?
Thank you very much for your answers in advance,
Regards,
Christoph (1 Reply)
hi ,
i m trying to run bash scrip automaticially but i dont know how i can do this an anybody tell me how i can autorun shell script when i logon .
thanks (9 Replies)
Hello,
I have problem in executing a shell script. When the shell script is executed at the shell prompt the script works successfully but when the same script is run as a cron job it fails to execute the files called within the shell script.
I have scheduled the job in my crontab file as
... (6 Replies)
How to make a script run automatically using a cron??
i do not know abt cron......
if i have simple.sh file and i need this to run everyday at a particular time what needs to be done
thanks in advance (4 Replies)
Hi All,
How to run a script automatically using cronjob everyday from Monday to Friday 9A.M to 5P.M at an interval of ONE HOUR.I want the complete syntax means how to put in the cron job and there after.
URGENTLY NEED HELP
THANKS IN ADVANCE
CHEERS
Arunava (7 Replies)