08-18-2008
Hi - Thank you for your replies ... I had intended to schedule the recordings from a script, avoiding the more tedious route via crontab itself. Regardless, since the bash scripts contain a single at command (scheduled time), I don't why cron is repeatedly spawning multiple processes (at commands, for the single, scheduled event).
That is, despite reading the file every minute, once this scheduled at command has been executed (at the appropriate time), shouldn't further calls to this bash file (with a now-expired at command start time) simply be ignored?
Or, it it the case that since the crontab-called file hasn't run it's course (completed, e.g for a scheduled recording of 1 hour), that cron thinks that the command hasn't executed, and tries to execute at the next available opportunity (here, every 1 minute)?
FYI, after I posted my original question, I had the idea (subsequently suggested, above), and directly called my record_tv_* scripts from crontab, which seems to be the solution - not quite what I had wanted, but so be it.
E.g.,
58 18 17 aug sun ~/recordings/record_tv_1
10 More Discussions You Might Find Interesting
1. Programming
I want to spawn n child processes but have two different classes..with the foremost one forking/spawning the child process and the latter performing a function w/ the spawned processes.
I can do this in one class with an if statement and the simple
if((pid=fork())==0) //child process
{
... (1 Reply)
Discussion started by: StrengthThaDon
1 Replies
2. Shell Programming and Scripting
Suppose that I am performing some operation on an sql database. Lets say process of Searching and then if a value is found, updating it... Now, when I have some millions of records on which the operation has to be performed... Does it help to spawn multiple processes each executing the same... (9 Replies)
Discussion started by: Legend986
9 Replies
3. Shell Programming and Scripting
Hi,
I need to spawn mutilpe threads , each invoking a different set of shell scripts, in parallel.
What would be the best way to do that.
Any sample script would greatly help. I am a novice at Unix so any help is much appreciated.
Thanks (5 Replies)
Discussion started by: neeto
5 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I need some assistance, if possible...
Our IMAP server has recently (as of 10:30 GMT today) started spawning multiple processes for no reason! This is causing the mail server's load average to increase continually until the whole machine grinds to a halt.
Here is a typical... (0 Replies)
Discussion started by: fishsponge
0 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I seem to be having a problem with accumulation of root CRON jobs occuring when I have a user's cron job(s) running.
Here is an example of a user's crontab file:
*/1 * * * * echo "hello" > /dev/nullps aux|grep CRON
root 14333 0.0 0.0 91236 2172 ? S ... (12 Replies)
Discussion started by: Narnie
12 Replies
6. Shell Programming and Scripting
Want to kill multiple processes by name. for the example below, I want to kill all 'proxy-stagerd_copy' processes.
I tried this but didn't work:
>> ps -ef|grep proxy_copy
root 991 986 0 14:45:34 ? 0:04 proxy-stagerd
root 1003 991 0 14:45:49 ? 0:01... (2 Replies)
Discussion started by: catalinawinemxr
2 Replies
7. Shell Programming and Scripting
:)Hi there, I am new to scripting and wanted to see if someone can show me how to grep on multiple processes and send the output to a file in /home/mydir/output.
I am aware of
ps -ef | grep on 1 process
but need help looking up multiple processes, can you use this command
ps -elf | grep |pid1... (4 Replies)
Discussion started by: abbya
4 Replies
8. AIX
Good night everyone, I've been trying to make AD authentication work with RBAC and I think I messed my test LPAR up.
I've manually modified the /etc/security/user.roles file, adding a role to one of my AD users (who is not defined locally) and then runned setkst. It worked fine, but now I found... (3 Replies)
Discussion started by: Janpol
3 Replies
9. Shell Programming and Scripting
Hi,
I am having a shell script which has a while loop as shown below.
while
do
sleep 60
done
I am executing this script from Informatica ETL tool command task from where we can execute UNIX commands/scripts. When i do that, i am seeing 2 processes getting started for one script... (2 Replies)
Discussion started by: chekusi
2 Replies
10. Solaris
Hi,
I am having a shell script on Solaris 10 which has a while loop as shown below.
#!/usr/bin/ksh
#
while
do
sleep 60
done
Name of the shell script is coldcentric.sh. I executed script /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh from a command task in Informatica worklow as... (3 Replies)
Discussion started by: chekusi
3 Replies
LEARN ABOUT CENTOS
crontab
CRONTAB(1) User Commands CRONTAB(1)
NAME
crontab - maintains crontab files for individual users
SYNOPSIS
crontab [-u user] file
crontab [-u user] [-l | -r | -e] [-i] [-s]
crontab -n [ hostname ]
crontab -c
DESCRIPTION
Crontab is the program used to install, remove or list the tables used to serve the cron(8) daemon. Each user can have their own crontab,
and though these are files in /var/spool/, they are not intended to be edited directly. For SELinux in MLS mode, you can define more
crontabs for each range. For more information, see selinux(8).
In this version of Cron it is possible to use a network-mounted shared /var/spool/cron across a cluster of hosts and specify that only one
of the hosts should run the crontab jobs in the particular directory at any one time. You may also use crontab(1) from any of these hosts
to edit the same shared set of crontab files, and to set and query which host should run the crontab jobs.
Running cron jobs can be allowed or disallowed for different users. For this purpose, use the cron.allow and cron.deny files. If the
cron.allow file exists, a user must be listed in it to be allowed to use cron If the cron.allow file does not exist but the cron.deny file
does exist, then a user must not be listed in the cron.deny file in order to use cron. If neither of these files exists, only the super
user is allowed to use cron. Another way to restrict access to cron is to use PAM authentication in /etc/security/access.conf to set up
users, which are allowed or disallowed to use crontab or modify system cron jobs in the /etc/cron.d/ directory.
The temporary directory can be set in an environment variable. If it is not set by the user, the /tmp directory is used.
OPTIONS
-u Appends the name of the user whose crontab is to be modified. If this option is not used, crontab examines "your" crontab, i.e.,
the crontab of the person executing the command. Note that su(8) may confuse crontab, thus, when executing commands under su(8) you
should always use the -u option. If no crontab exists for a particular user, it is created for him the first time the crontab -u
command is used under his username.
-l Displays the current crontab on standard output.
-r Removes the current crontab.
-e Edits the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor,
the modified crontab will be installed automatically.
-i This option modifies the -r option to prompt the user for a 'y/Y' response before actually removing the crontab.
-s Appends the current SELinux security context string as an MLS_LEVEL setting to the crontab file before editing / replacement occurs
- see the documentation of MLS_LEVEL in crontab(5).
-n This option is relevant only if cron(8) was started with the -c option, to enable clustering support. It is used to set the host in
the cluster which should run the jobs specified in the crontab files in the /var/spool/cron directory. If a hostname is supplied,
the host whose hostname returned by gethostname(2) matches the supplied hostname, will be selected to run the selected cron jobs
subsequently. If there is no host in the cluster matching the supplied hostname, or you explicitly specify an empty hostname, then
the selected jobs will not be run at all. If the hostname is omitted, the name of the local host returned by gethostname(2) is
used. Using this option has no effect on the /etc/crontab file and the files in the /etc/cron.d directory, which are always run,
and considered host-specific. For more information on clustering support, see cron(8).
-c This option is only relevant if cron(8) was started with the -c option, to enable clustering support. It is used to query which
host in the cluster is currently set to run the jobs specified in the crontab files in the directory /var/spool/cron , as set using
the -n option.
SEE ALSO
crontab(5), cron(8)
FILES
/etc/cron.allow
/etc/cron.deny
STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax differs from previous versions of Vixie Cron, as
well as from the classic SVR3 syntax.
DIAGNOSTICS
An informative usage message appears if you run a crontab with a faulty command defined in it.
AUTHOR
Paul Vixie <vixie@isc.org>
Colin Dean <colin@colin-dean.org>
cronie 2012-11-22 CRONTAB(1)