- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: crontab
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 06:31 AM
тАО09-27-2007 06:31 AM
crontab
I have a crontab for oracle user and everithing seems to be well but it does not execute.
I can execute manually the script, but it is never execute by the crontab.
Any ideas abot what to check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 06:36 AM
тАО09-27-2007 06:36 AM
Re: crontab
cron has a limited environment. The most common problem is the PATH variable is not the same.
From command line:
env > /tmp/env.txt
Some environment variable in that file is missing when cron runs.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 06:40 AM
тАО09-27-2007 06:40 AM
Re: crontab
export ORACLE_SID=lcprod01n1
export ORACLE_HOME=/opt/oracle/rdbms/9.2.0
echo "Inicia "$ORACLE_SID": "$(date +"%Y-%m-%d %H:%M.%S") >> /home/oracle/runstat.log
$ORACLE_HOME/bin/sqlplus /nolog @/home/oracle/scripts/runstat.sql
echo "Termina "$ORACLE_SID": "$(date +"%Y-%m-%d %H:%M.%S") >> /home/oracle/runstat.log
If the problem would be the envirnoment, at least the line where I log the "inicia (start)" should be executed, but does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 07:30 AM
тАО09-27-2007 07:30 AM
Re: crontab
90% of the time its the PATH variable.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 07:33 AM
тАО09-27-2007 07:33 AM
Re: crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 07:53 AM
тАО09-27-2007 07:53 AM
Re: crontab
58 20 * * * /home/oracle/scripts/runstat.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 07:59 AM
тАО09-27-2007 07:59 AM
Re: crontab
$ crontab -l
58 20 * * * /home/oracle/scripts/runstat.sh > /tmp/runstat.log 2>&1
Set the time execute right now and then post the /tmp/runstat.log file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 08:42 AM
тАО09-27-2007 08:42 AM
Re: crontab
The /tmp/runstat.log was not generated. The script was never executed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 08:57 AM
тАО09-27-2007 08:57 AM
Re: crontab
service crond status
tail /var/log/cron
Or check in /var/log/cron what happened with your job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 09:02 AM
тАО09-27-2007 09:02 AM
Re: crontab
crond (pid 12343) is running...
[root@ita1 mail]# tail /var/log/cron
Sep 27 21:40:06 ita1 crontab[12805]: (oracle) REPLACE (oracle)
Sep 27 21:40:06 ita1 crontab[12805]: (oracle) END EDIT (oracle)
Sep 27 21:41:01 ita1 crond[12343]: (oracle) RELOAD (cron/oracle)
Sep 27 22:01:01 ita1 crond[13006]: (root) CMD (run-parts /etc/cron.hourly)
Sep 27 22:25:44 ita1 crontab[13222]: (oracle) BEGIN EDIT (oracle)
Sep 27 22:26:02 ita1 crontab[13222]: (oracle) END EDIT (oracle)
Sep 27 22:26:09 ita1 crontab[13225]: (oracle) BEGIN EDIT (oracle)
Sep 27 22:26:29 ita1 crontab[13225]: (oracle) REPLACE (oracle)
Sep 27 22:26:29 ita1 crontab[13225]: (oracle) END EDIT (oracle)
Sep 27 22:27:01 ita1 crond[12343]: (oracle) RELOAD (cron/oracle)