Bash Process not killed when using crontab
Hi,
I am new to this form and to linux. (Sorry for my English) I have 5 bash scripts written in bash. It is a simple script that puts files on the internet, using ftp. This scripts runs every 5 minutes and one script every 1 minute using crontab. Code:
#!/bin/sh When the script is done, not every time the process is killed. After a week I have about 400 process running ftp. Then I must use kill -9 to kill the process. Is the a easier way to do this or to control the process using a pid file? The script is simulaitr to this: Code:
#!/bin/sh |
Hi and welcome to LQ!
First thing I noticed about the above script: - the ftp session is not ended (no bye), - the here-document doesn't end (no closing EOF). Hope this helps. |
Hi and tnx,
I have put the lines at the end of the file. Is das not help. Perhaps the FTP session is dead and the jobs is not stoped. (completed') Not always. It is I think 50/50. Sometimes it stops and sometimes not. |
can you show what did you put at the end of the file?
|
Hi,
This is what I did: Code:
bye Is is not closed, perhaps hanging? |
Hi,
Quote:
You might also try to add the -i switch to the ftp command: Code:
ftp -n home.provider.com<<EOF Quote:
Hope this helps. |
I have done the changes. Still some running processes. But not 100's.
Also I think that the ftp session is not closed by error or something. And deleted the line prompt. |
All times are GMT -5. The time now is 02:12 PM. |