- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cron entry for C script
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
тАО05-17-2007 06:46 PM
тАО05-17-2007 06:46 PM
Cron entry for C script
how to give the crontab entry for the executable script written in C language.
Any answer will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 08:10 PM
тАО05-17-2007 08:10 PM
Re: Cron entry for C script
its the same format as any other program or script:
0 * * * *
see "man cron" and "man crontab"
Just be aware that you do not have a "full" environment when you run from cron, so anything like $ORACLE_HOME etc you have to make known to the program !
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 08:31 PM
тАО05-17-2007 08:31 PM
Re: Cron entry for C script
the entry would be same as any other script that have scheduled previously.
all you have to ensure is that it is being run under the appropriate environment.
e.g.
#******************************************************
23 15 * * * echo "/home/chetana07/cprog/demo01; exit"|su - oracle 1> /tmp/output_demo01.crn
2> /tmp/error_demo01.crn
#******************************************************
# END OF TABLE day0->Sunday day6->Saturday
#******************************************************
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2007 12:40 AM
тАО05-18-2007 12:40 AM
Re: Cron entry for C script
There is no way to execute a script in C-Language. You need to compile it using a C-Compiler and will receive a binary file that can be scheduled like any other program.
If you are refering to csh-script, the problem is, that cron runs sh. So you need to execute the csh itself and give your script as a parameter like
/usr/bin/csh -c /home/myscripts/thisone.csh
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2007 02:38 AM
тАО05-18-2007 02:38 AM
Re: Cron entry for C script
#!/usr/bin/csh
This will cause the script to be run as a csh script regardless of the shell invoked by cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2007 05:44 PM
тАО06-19-2007 05:44 PM