Skip to contentSkip to conversation

How to send SIGTSTP, SIGCONt signals to a script scheduled using cron

DISCUSSION Saurabh Agarwal 2 participants 2 messages Sep 23, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,
I had scheduled a script using cron and got pid of it when it is running as it is running for a long time.The script is somewhat like

cmd
sleep 10
cmd2
sleep 20
..
This is scheduled using cron now i want to send SIGTSTP signal to it to suspend it
and SIGCONT to resume it but these signals are not working please help urgently. kill -SIGTSTP pid

Thanks

Signature · 7 lines
Saurabh Agarwal
9868358071

_______________________________________________
ilugd mailinglist -- ilugd-cunTk1MwBs8/[email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd-cunTk1MwBs8/[email protected]/
#1 lore raw

Re: How to send SIGTSTP,SIGCONt signals to a script scheduled using cron

hi

the step i told u earlier will definatly work

pid=ps ax | grep urcommand | cut -b 2-6 | grep -v tty

u have to include more with tty like pty etc

if any script is scheduled using cron, the script names does appears in ps ax output, and u can gets pid on this basis.

once u got pid u can easily send sigals to it.

please let me know if u have ne further query

-Manish
LinuxIndia.net

--- Saurabh Agarwal <[email protected]>

Quoted 18 lines · wrote:

Hi all,
I had scheduled a script using cron and got pid of it when it is
running as it is running for a long time.The script is somewhat like

cmd
sleep 10
cmd2
sleep 20
..
This is scheduled using cron now i want to send SIGTSTP signal to it
to suspend it
and SIGCONT to resume it but these signals are not working please help urgently.
kill -SIGTSTP pid

Quoted 5 lines

Thanks

Signature · 2 lines
Saurabh Agarwal
9868358071

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com