LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-22-2008, 06:31 AM   #1
learnq
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Rep: Reputation: 0
Question cronjob to restart flashplayer


Hi ,

i wrote the following script named /etc/script/midnight.sh

chmod 777 /etc/script/midnight.sh

midnight.sh
#!/bin/sh
#pid=`/bin/ps -ef | /bin/grep /usr/bin/flashplayer`;
pid=`/bin/ps -ef | /bin/grep /usr/bin/flashplayer | grep -v grep| awk -F' ' '{print $2}'`;
if test "$pid" = "" ; then
echo "Process does not run yet!";
else
echo "Killing process..."
kill -9 $pid;
fi
echo "Restarting flashplayer...";
/usr/bin/flashplayer /home/player.swf


[root@localhost script]# crontab -l
@hourly /etc/script/midnight.sh

cron log
Mar 1 19:00:01 localhost crond[3324]: (root) CMD (/etc/script/midnight.sh)
Mar 1 19:01:01 localhost crond[3336]: (root) CMD (run-parts /etc/cron.hourly)


what i waht is ...the player will stop every one hour and than restart(play) in 'demo' user's monitor.

what is wrong . Please help. Thanks.
 
Old 02-22-2008, 10:08 PM   #2
learnq
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
fixed . thx.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cronjob to restart httpd if httpd is dead heropage Linux - Software 1 10-31-2007 01:22 PM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
cronjob help meeh Linux - General 1 03-26-2004 11:41 AM
cronjob ugob Linux - Software 0 03-03-2004 09:20 AM
cronjob FastEddy Linux - General 1 04-12-2003 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration