Crontab spawning multiple at processes


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Crontab spawning multiple at processes
# 8  
Old 08-18-2008
Something like

Code:
atq | cut -f1 | xargs atrm

# 9  
Old 08-18-2008
Quote:
Originally Posted by era
Something like

Code:
atq | cut -f1 | xargs atrm

Brilliant - this worked - thanks!! :-)
# 10  
Old 08-18-2008
Update: Scheduling recordings via "at,"

at -f ~/recordings/record_tv_test 6:15 pm Aug 18 2008

where record_tv_test is an executable bash file (below) works fabulously (as did the command to delete all those 100's! of "un-needed" at commands, that accumulated via cron)!

Thanks again - you guys are great! Greg :-)

#!/bin/bash

tuner=/dev/video0
# or /dev/video1 for my 2nd Hauppauge PVR-500 card
channel=58
duration=00:05:00 # hh:mm:ss
record_directory=/media/sdb1/recordings/UNPROCESED/
file_name=test

ivtv-tune -c $channel -d $tuner

sleep 1

mencoder pvr:// -tv \
driver=v4l2:width=640:height=480:input=0:device=$tuner:norm=NTSC:chanlist=us-cable:outfmt=yuy2:adevice=/dev/dsp:audiorate=44100 \
-vf lavcdeint \
-ovc lavc \
-lavcopts vcodec=mpeg4:vbitrate=4500:keyint=3 \
-oac mp3lame \
-lameopts br=128:cbr:mode=3 \
-ffourcc divx \
-endpos $duration \
-quiet \
-o $record_directory$file_name"_"`date +%A_%B_%d_%Y_%I:%M_%p`.avi
# 11  
Old 08-18-2008
Quote:
Originally Posted by Vi-Curious
When you set up your cron, you set it to call the script every minute. So, every minute, cron calls your script and your script schedules an at job. When that time arrives, the system will start running all of those queued up jobs scheduled by at.

Once you have passed the time specified in the at command, cron is still going to call your script (every minute) and it is going to try to schedule the at. Since the time is now passed, those at jobs should not be scheduled, but cron and the script are going to continue to run. How do you expect them to know that the time is expired? At will know the time is already expired and refuse to schedule a new job but everything leading up to that point is still going to happen.
Well explained Vi-C. This is what I thought was happening, but couldn't put into words the way you did. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Script on Solaris spawning 2 processes for one shell script execution

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

2. Shell Programming and Scripting

Shell script executed from Informatica ETL tool is spawning 2 processes for one script

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

3. AIX

Multiple pconsole processes spawning indefinetly

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

4. Shell Programming and Scripting

need help ps -e on multiple processes

:)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

5. Shell Programming and Scripting

kill multiple processes by name

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

6. UNIX for Dummies Questions & Answers

If user has own crontab, results in accumulation of root CRON processes

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

7. UNIX for Advanced & Expert Users

Help! imapd is spawning multiple processes, all of a sudden, for no reason!

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

8. Shell Programming and Scripting

Spawning multiple threads in Unix

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

9. Shell Programming and Scripting

Doubt about multiple processes

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

10. Programming

spawning multiple processes spread across two files

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
Login or Register to Ask a Question