Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Rep:
Can't kill application with cron
Hi!
I have a script that gets the PID of Exaile and kills it. It works well, but when I try to execute this script with cron it doesn't work. My cron is working fine, because in the script I included an echo to a file, just to see if it was working with cron, and it does the echo.
Is it because you can't kill applications with cron?
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Original Poster
Rep:
Cron problem
Hi!
The user who is executing the cron is my personal user, not root. The
crontab is the one of my user.
The problem is that it can execute any other command but the kill.
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Original Poster
Rep:
Cron problem
Hi!
$ ps -ef | grep exaile
Shows the same PID as top, I did not check the UID and GID, as soon as I get home, I will check it. The problem here is that if I execute the script from the terminal it kills exaile, but when cron executes the script it does not work.
What do your logs indicate when it attempts to run the kill script? Are you specifying the full path to the kill command in this script, usually it's a PATH issue when it comes to cron problems? My other question is, why do you need a cron job to kill a PID?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.