Ubuntu :: Using Crontab To Restart Pidgin?

May 23, 2010

Pidgin likes to randomly crash on me, and sometimes it takes me awhile to notice. So I thought why not make a script and cron job to see if pidgin is running and restart it if needed. Sounded easy but having all kinds of problems. Here's my cron line...
Code:
*/1 * * * * /home/justin/chkpdgn.sh >> /home/justin/test.log 2>&1
I run "tail -f /home/justin/test.log" to keep an eye on the cron output.

Here's the chkpdgn.sh script...
Code:
#!/bin/bash
SERVICE='pidgin'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "$SERVICE service running, everything is fine"
else
echo "$SERVICE is not running"
$SERVICE
fi

Running that works fine when I do it, but when cron does it pidgin never starts and I get this error...
Code:
pidgin is not running
error: line 15: bad flag alias index: 0
error: line 15: bad flag vector alias
error: line 16: bad flag alias index: 0
error: line 16: bad flag vector alias
That goes on for quite awhile up to like line 60000 and pidgin runs but doesn't show up in the me menu. Any way to restart pidgin when it crashes?

View 2 Replies


ADVERTISEMENT

Ubuntu :: How To Restart Gdm From Crontab

Jun 16, 2010

I'm having problems trying to restart gdm from crontab and I'm not sure what I'm doing wrong. Basically what I want to do is a 'logout' every morning before I get to work so that by the time I get to my computer I would just have to log back in and have a fresh gnome session.

The command I'm using to restart gdm is:

Code:
/usr/sbin/service gdm restart

If I run this command from a terminal as root it works.

To edit my crontab file I'm doing:

Code:
sudo crontab -u root -e

And adding the following line to it:

Code:
25 08 * * 1-5 /usr/sbin/service gdm restart

My understanding is that this should restart gdm every day of the work week (Mon-Fri) at 08:25. But for some reason this is not happening.

I also checked that my cron deamon is running by:

Code:
~$ service gdm status

gdm start/running, process 27156

View 5 Replies View Related

General :: Restart The Crontab, If Change The Script Which Was Running?

Aug 24, 2010

that If I am fire a crontab which is running myScriptThe crontab is runningNow if I change the source code of myScriptDo I need to restart the crontab, to take into effect mychanges Ie I want in the existing crontab to take my updated script

View 2 Replies View Related

General :: Crontab Not Working \ Edited Crontab File Using Crontab -e?

Apr 27, 2010

I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday

View 3 Replies View Related

Ubuntu :: Can't Update Packages Due To Some Fail Conflict Between Pidgin And Pidgin-facebookchat

Jan 5, 2011

I have a Kubuntu 10.10 install on which I can't update my packages due to some fail conflict between pidgin and pidgin-facebookchat. I can't even remove the stuff via apt-get due to this conflict...

sudo apt-get remove pidgin
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:

[Code]...

View 3 Replies View Related

General :: Possible Disabling Crontab Job Without Deleting Crontab Description Entry

Jun 23, 2011

is it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh

View 4 Replies View Related

General :: Pidgin Installation Via Terminal - Packages Have Unmet Dependencies: Pidgin: Depends: Libpurple0

May 1, 2010

I am using Ubuntu 9.04. After doing sudo apt-get update When I try to insatll pidgin via terminal it shows: XXX@XXX-desktop:~$ sudo apt-get install pidgin Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

The following information may help to resolve the situation: The following packages have unmet dependencies: pidgin: Depends: libpurple0 (>= 1:2.6.0) but it is not going to be installed Depends: perl (>= 5.10.0-19ubuntu1.1) but 5.10.0-19ubuntu1 is to be installed E: Broken packages

View 5 Replies View Related

Ubuntu Servers :: After Using Crontab With /etc/crontab / Giving Error "can't Find Command Root"?

Aug 26, 2010

I have a question about using crontab with /etc/crontab...

I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).

Originally, my cron job looked like this:

30 * * * * root /my/batch/script &> /dev/null

After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.

So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).

How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)

View 2 Replies View Related

Software :: Scheduling Backup In Crontab When Put This File In Crontab To Schedule The Backup Program It Wont Run?

Apr 9, 2011

I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh

View 1 Replies View Related

Debian Multimedia :: Pidgin: Symbol Lookup Error: Pidgin: Undefined Symbol: Purple_media_element_info_get_type

Aug 1, 2010

Previously after doing aptitude upgrade, my pidgin seems broken with no gui shown. So I decided to download the latest source from pidgin website and build it from source, but I think I made situation worse because it then complained that ssl lib was needed. Then I removed the libpurple (e.g. aptitude purge libpurple0 libpurple-bin libpurple-dev) and reinstalled pidgin (aptitude install pidgin). Now it shows the error

pidgin: symbol lookup error: pidgin: undefined symbol: purple_media_element_info_get_type

I searched on the internet and can not find a solution. The clues on the internet says that's because the piding I use is the older version of libpurple. But I think I've removed all with purge and reinstalled it. Maybe some legacy binary is referenced. What or where it might be? Or where there may contain related information.

View 2 Replies View Related

Fedora :: Write A Crontab Entry Using "crontab -e"

Jul 21, 2011

I was trying to write a crontab entry using "crontab -e"


Code:
0 0 * * * cp /var/log/httpd/domains/mydomain.net.log
/home/admin/logs/mydomain.net.log

crontab is giving me this error:

Code:
"/tmp/crontab.XXXXfMOnRS":2: bad minute
errors in crontab file, can't install.

I've tried a dozen different values for the minute, but it's still giving me the same error.

View 5 Replies View Related

General :: Difference Between /etc/crontab And "crontab -e"

May 29, 2011

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?

View 2 Replies View Related

Ubuntu Installation :: System Automatically Tried To Restart But On The Restart Got The 'terminal' View

Apr 30, 2011

I have just finished the upgrade of the latest version and I'm at the point of my system restating.

My system automatically tried to restart but on the restart I got the 'terminal' view. It stopped when asking for my username (it never normally asks for this before the grub menu) and then password. I didn't get any further than that.

I now have on my screen (still in the terminal view before the grub menu)

"name@name-desktop:...$ "

I'm on my phone now so I don't actually have the symbol for before the dollar sign but your know what it is. The raised S on a 90 degree angle.

View 6 Replies View Related

Ubuntu :: How To Restart Network Adapter (not Service) Without Restart?

Mar 13, 2010

I have a suspend problem in my laptop. Sometimes, when resuming from suspend, the network adapter is down (that is, the network does not work and the light of the network adapter is off). Restarting the network service doesn't work, because I think that the system forgot about the hardware, and probably the driver should be reloaded.Does anyone knows how to do that?(ps. /etc/init.d/networking restart does not work, because the hardware driver is not being recognized anymore).

View 5 Replies View Related

General :: Restart Dhcp From /etc/init.d/dhcpd Restart

Feb 27, 2010

i have installed dhcp,there i declared the subnet and network,i used command include "/etc/dhcpd.conf.jutu1"; to start and other files, but it show me this error when i want to restart the DHCP, if you need more information contact me, i have configured this file too jutu1, but it don't let me to restart dhcp from /etc/init.d/dhcpd restart, this show me this message

[Code]..

View 3 Replies View Related

Debian Multimedia :: GDM Goes To Tty On Restart / Doesn't Restart

Apr 5, 2010

Whenever I choose "Restart" from the GDM screen, GDM appears to shutdown, and the first TTY is displayed with a login prompt at the bottom (assuming I haven't used that TTY). I am by no estimation a patient individual, but I waited a solid minute or two for something to happen, but nothing ever did. I end up logging in as root on that TTY and running "shutdown -r now" to get the job done. This is a shared computer, and ideally any user should be able to perform shutdown options graphically from GDM.The only mentioned workaround doesn't apply to me as I am using the nvidia driver, not intel.

View 1 Replies View Related

General :: Difference Between Restarting/stopping Apache Using 'service Httpd Restart/stop' And Apachectl Restart/stop

Oct 11, 2010

whats the difference between restarting/stopping apache using 'service httpd restart/stop' and apachectl restart/stop. I know that using 'service httpd restart' is actually a script in /etc/init.d/httpd but what about apachectl?

View 1 Replies View Related

Ubuntu :: How To Use Crontab

Sep 1, 2010

How to use crontab? i need to set crontab to execute a file every 1 minute

View 2 Replies View Related

Ubuntu :: Can't Get Crontab To Work / Fix It?

Jan 10, 2010

Let me first start by introducing myself. I'm completely new to Linux. I've always argued Windows was better, even if I secretly thought not. Anyways the time has come to make the transition (I'm moving into computer forensics so I need to learn linux )

SO i'm trying to use crontab -e. I've installed gnome scheduler as I'm not comfortable editing in command line yet.

I've setup blackjack to start everyday at 23.30. The command line I've entered is /usr/games/blackjack and this works perfectly fine in command line.

View 2 Replies View Related

Ubuntu :: Crontab Commands Won't Run?

Jan 21, 2010

Edit: commands like Firefox works after I set it to display properly. I still can't get personal scripts to run, though.I can't seem to get crontab to run my commands. I add

Code:
* * * * * /home/username/script
but it doesn't seem to work. The script works itself in the shell

View 1 Replies View Related

Ubuntu :: Schedule A GUI App With At Or Crontab?

Mar 2, 2010

I want to schedule a Java program to run at a certain time, which will open a GUI progress monitor while it runs, and then terminate when it's done. I can execute it fine from the command line, but I it doesn't seem to work when I schedule it with crontab. In fact, I can't make any gui by scheduling it, not even something like gedit or firefox.

I know it's pretty rare that someone would want to do this, but is there any way to schedule a GUI app?

View 1 Replies View Related

Ubuntu :: How To Run .sh File Using Crontab

Aug 4, 2010

I have a .sh file which i want to run using crontab at a specific time with root privilege.

I put an entry in root's crontab as the following:

sh /home/vivek/ifconfig/college.sh

But, the file do not get executed at a given time.

View 1 Replies View Related

Ubuntu :: Some Of Crontab Don't Run / Get It To Work?

Aug 19, 2010

Figure out why this /etc/crontab won't run correctly?
Is it possible that it don't run because the cron deamon is not running? code...

View 1 Replies View Related

Ubuntu :: Rsync - .sh And Crontab

Feb 14, 2011

I'm currently trying to have crontab to automatically backup files from ramdisk. It works perfectly when I run it myself by simply cd:ing to scripts directory and type ./save_world.sh.

The problem is, that crontab DOES (at least it looks like it) run that command every one minute. /var/log/syslog does show it executing that line every one minute without any errors. I'm currently very confused what I did wrong here. I have tried rebooting, fiddling with crontab line, tried sudo crontab -e but nothing seems to work.

My script is called save_world.sh and it is located in /home/phoe/minecraft/rpg/

Code:

My crontab -e has one line and it is following:

Code:

I haven't determined any specific time yet, because I'm just trying to get it work first.

Snippet from /var/log/syslog:

Code:

View 4 Replies View Related

Ubuntu :: Crontab Job Not Executing

Sep 1, 2011

I am a xfce user. I have a list of wallpapers and I wanted to change them every 5 minutes Initially I was using a simple command in crontab entry to change it, Quote: */5 * * * * xfdesktop --reload it was working but it would crash xfdesktop process after few changes and the screen would be all grey. To solve this issues I wrote a simple script which would check if xfdesktop is alive and if yes it would call xfdesktop --reload else start xfdesktop I called this script idesktop & its path is ~/.bin/idesktop

[Code]....

View 8 Replies View Related

Ubuntu :: Can't Create A New File Using Crontab

Apr 15, 2010

A couple days ago I noticed cron stopped working and now I can't create a new file using crontab -e. When I hit crontab -e I get the editor but after saving nothing comes up under crontab -l and the file is blank when I reopen it. I don't have a cron.allow or a cron.deny.

View 4 Replies View Related

Ubuntu :: Crontab Stopped Working / What To Do?

Apr 20, 2010

Have just started to use look at crontab. I could use Scheduled Tasks as well as crontab -e in terminal.

I must have changed something because now Scheduled Tasks just seems to load then dropout. Loading a task through terminal is accepten (crontab -e) but doesn't work.

View 1 Replies View Related

Ubuntu :: Making Script To Be Run With Crontab

Jun 29, 2010

Not strictly being applied to an Ubuntu distro but Linux all the same.Our company run a database server referenced by a number of mail servers; the database server is very soon to be replaced since it's old, decrepit and not as secure as it should be - indeed, when it decides it's had enough, the MySQL process will simply stop.You can restart MySQL if you need to quite easily; using Putty, I'll connect to the box and run the command:/etc/rc.d/ init.d/mysqld restart

Using /etc/rc.d/init.d/mysqld status you can get a response of either mysqld (pid 8354) is running... or mysqld is stopped - how can I use this information in a script so that mysqld is only restarted if every thirty minutes a check comes back to say it's stopped? this current server is replaced by someone who knows what he's doing in a few weeks but this will ensure less disruption to those who rely on the current incarnation...

View 2 Replies View Related

Ubuntu :: Output Redirect With Crontab?

Sep 16, 2010

My Problem: The output redirection auf a script works if the script is called in the terminal but not when its called via crontab.

My Situation: I have 2 scripts:
~/backup1
Code:
echo backup a to c
rsync -a -v --progress --delete --exclude=.Trash-1000 /path/a/ /path/c/backup/
echo backup b to c

[Code]...

View 1 Replies View Related

Ubuntu :: 10.04 - Crontab And Daylight Savings?

Nov 12, 2010

I recently set up some new cron jobs under Ubuntu 10.04 64-bit (all the latest patches as of Nov. 11th) and just happened to check right after one was supposed to run and it hadn't run yet. Checking the logs I found the previous cron job ran exactly one hour later than it was supposed to. Is there something going on with Ubuntu 10.04, cron, and daylight savings where cron pretends daylight savings never happened or something?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved