Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Shell not running through cron Post 302734987 by vbe on Friday 23rd of November 2012 08:13:36 AM
Old 11-23-2012
Thanks for keeping us informed!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cron running shell scripts.

What are the rules of calling shell scripts in cron. How do I go about setting up the correct PATHS that calls a script, which then calls another sub script all of which has to retain the orginal PATHS and VARS that I've set up in first script Confused.. ok Well Cron calls a script... (3 Replies)
Discussion started by: cfoxwell
3 Replies

2. Shell Programming and Scripting

error in running shell script in cron

#!/bin/bash CLASSPATH=. #CLASSPATH=${CLASSPATH}:${INSTALL_PATH}home/squidlog/CopyFile.java CLASSPATH=${CLASSPATH}:${INSTALL_PATH}usr/java/latest/lib/*.jar javac CopyFile.java echo "CLASSPATH=$CLASSPATH" #home/wbiadmin/JRE1.4.2/j2re1.4.2_15/bin/java CopyFile /usr/bin/java... (3 Replies)
Discussion started by: sari
3 Replies

3. Shell Programming and Scripting

Running a shell script in cron...email not sending - help??

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

4. Shell Programming and Scripting

URGENT: cron job not running the sqlplus command in shell script

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

5. Shell Programming and Scripting

[Solved] Error while running on Cron

All, I am running one perl script from prompt and its running fine, but while putting it on cron gives below error, DB-Library error: Could not open interface file. (2 Replies)
Discussion started by: Deei
2 Replies

6. OS X (Apple)

[Solved] Running shell code in AppleScript without Terminal

What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete. Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time. To simplify my question, this is what I want to achieve.... (9 Replies)
Discussion started by: ShadowofLight
9 Replies

7. Shell Programming and Scripting

Running Shell Script in the cron, background proccess

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

8. Shell Programming and Scripting

Running Shell Script in the cron, background process

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

9. Shell Programming and Scripting

Running shell script via cron

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

10. UNIX for Beginners Questions & Answers

Troubles running DB2 command in shell script via cron

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
rpoll(3)							  BEGEMOT Library							  rpoll(3)

NAME
rpoll - callback functions for file descriptors and timers SYNOPSIS
# include <rpoll.h> typedef void (*poll_f)(int fd, int mask, void *arg); typedef void (*timer_f)(int tid, void *arg); int poll_register(int fd, poll_f func, void *arg, int mask); void poll_unregister(int handle); int poll_start_timer(u_int msecs, int repeat, timer_f func, void *arg); void poll_stop_timer(int handle); int poll_start_utimer(unsigned long long usecs, int repeat, timer_f func, void *arg); void poll_dispatch(int wait); DESCRIPTION
Many programs need to read from several file descriptors at the same time. Typically in these programs one of select(3c) or poll(2) is used. These calls are however clumsy to use and the usage of one of these calls is probably not portable to other systems - not all sys- tems support both calls. The rpoll(l) family of functions is designed to overcome these restrictions. They support the well known and understood technique of event driven programing and, in addition to select(3c) and poll(2) also support timers. Each event on a file descriptor or each timer event is translated into a call to a user defined callback function. These functions need to be registered. A file descriptor is registered with poll_register. fd is the file descriptor to watch, mask is an event mask. It may be any combination of POLL_IN to get informed when input on the file descriptor is possible, POLL_OUT to get informed when output is possible or POLL_EXCEPT to get informed when an exceptional condition occures. An example of an exceptional condition is the arrival of urgent data. (Note, that an end of file condition is signaled via POLL_IN). func is the user function to be called and arg is a user supplied argument for this function. The callback functions is called with the file descriptor, a mask describing the actual events (from the set supplied in the registration) and the user argument. poll_register returns a handle, which may be used later to de-register the file descriptor. A file descriptor may be registered more than once, if the function, the user arguments or both differ in the call to poll_register. If func and arg are the same, then no new registration is done, instead the event mask of the registration is changed to reflect the new mask. A registered file descriptor may be de-registered by calling poll_unregister with the handle returned by poll_register. A timer is created with poll_start_timer or poll_start_utimer. msecs is the number of milliseconds in poll_start_timer while usecs is the number of microseconds in poll_start_utimer, after which the timer event will be generated. If the functions use the poll(2) system call, then usecs is rounded to milliseconds and poll_start_timer is called. repeat selects one-short behavior (if 0) or a repeatable timer (if not 0). A one-short timer will automatically unregistered after expiry. func is the user function which will be called with a timer id and the user supplied arg. poll_start_timer and poll_start_utimer return a timer id, which may be used to cancel the timer with poll_stop_timer. A one-short timer should be canceled only if it has not yet fired. poll_dispatch must be called to actually dispatch events. wait is a flag, which should be 0, if only a poll should be done. In this case, the function returns, after polling the registered file descriptors and timers. If wait is not 0, poll_dispatch waits until an event occures. All events are dispatch (i.e. callback functions called) and poll_dispatch returns. Typical use is: while(1) poll_dispatch(1); SEE ALSO
poll(2),select(3C) RETURN VALUES
poll_register , poll_start_timer and poll_start_utimer return a handle which may be used to unregister the file descriptor or cancel the timer. Both functions and poll_dispatch call xrealloc(l) and can end in panic(l). ERRORS
System call or memory allocation errors are fatal and are handle by calling panic(l). The one exception is a return of EINTR from select(3c) or poll(2) in poll_dispatch. In this case poll_dispatch simply returns. BUGS
Obscure sequences of poll_start_timer and poll_stop_timer in callback functions may probably break the code. The semantics of POLL_EXCEPT are not clear. AUTHORS
Hartmut Brandt, harti@freebsd.org BEGEMOT
8 Dec 2006 rpoll(3)
All times are GMT -4. The time now is 02:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy