CentOS 5 :: Crontab - Doesn't Run Script
Mar 25, 2010
i'm using a script to delete files in a specific folder which are older then x days. The script looks like this:
#!/bin/bash
find /usr/share/directory -mtime +6 -print0 | xargs -0 rm
find /usr/share/another_directory/ -mtime +6 -print0 | xargs -0 rm
View 7 Replies
ADVERTISEMENT
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
Feb 16, 2010
Either no error and it doesn't run (The scripts all run fine manually and in the cron.daily, cron.hourly, etc. directories.) If it does try to run it, it shows this: Feb 16 12:59:01 buddha crond[3638]: (*system*) BAD FILE MODE (/etc/crontab). Here's my crontab:
[code]...
View 11 Replies
View Related
Apr 26, 2011
In RHEL6 root's account I have crontab job: 30 6 18 4 1 /sbin/init 6 It worked fine on the 18th of April and properly restarted my system, BUT it also restarted my OS at 6:30 on next Monday - 25th of April.
View 2 Replies
View Related
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
Jun 17, 2009
I'm setting up a new server and have edited the crontab to a run a script but nothing is happening, is there anything I need to setup to get the crontab working?
View 6 Replies
View Related
Apr 15, 2009
When I setup crontab as a local user (settings shown below), then it can pop-up a xmessage windows * * * * * DISPLAY=:0.0 /usr/bin/xmessage -center "warning message here" but when I switch to root, and setup the same things in crontab, why it cannot pop-up a xmessage windows? Any special limitation for root to use crontab?
View 2 Replies
View Related
Aug 6, 2009
I'm using crontab for user ABC in a month and have no problem.. But today i want to add new schedule user ABC with crontab.. i found this error
/tmp/crontab.XXXXDYxb6a: Permission denied
so i check with crontab -l command, it can show my schedule.. If I use root, crontab -e and crontab -l work properly..
Note: ls -al /tmp
drwxr-xrwx 8 root root 4096 Aug 6 09:30 .
drwxr-xr-x 24 root root 4096 Jul 19 17:10 ..
drwxrwxrwt 2 root root 4096 Jul 19 17:20 .font-unix
View 1 Replies
View Related
Jul 10, 2009
I've just discovered that crontab is creating a new file in the root directory every time it executes a cronjob, and it doesn't erase over the old file so there are thousands of files in the root directory, they have the same name as the script file (appended with a numeral) but are all blank.here is what one of the cronjob's looks like[URL]
View 10 Replies
View Related
Aug 23, 2010
I am running ubuntu 10.04 as a web/file server. I have set up several cron jobs in the past which until recently were executing normally. However, a few days ago, cron jobs stopped executing after a restart. I was able to fix the problem by deleting and reentering the cron jobs, but only until the next restart. ps -ef lists cron.
Summary:
1.) Cron was working --jobs executed without error and restarts worked fine
2.) Cron jobs stopped executing after a restart about a week ago --ps -e still lists cron
3.) Removing all cron jobs and reentering them by copying and pasting fixes until next restart
4.) Cron job syntax is known to be correct since they were executing before this problem arose.
View 5 Replies
View Related
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
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
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
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
Jun 27, 2009
This will be a little long (having read Phil's 'how to ask questions' FAQ). I'm trying to get OpenVPN working between my CentOS server and some Windoze laptops running XP. There seems to be plenty of sample
config files available, but to date, none of them have worked for me. Pulling out my trusty Wireshark, I've found some clues,
BACKGROUND:
My local subnet (NAT'ed by my gateway router) is 192.168.52.x. My router has been configured with a conduit (port-forward) for port 1194 (the standard OpenVPN port), which points towards my CentOS server.The CentOS server is .52.112, and the supplicant is .52.110. I have tried the lient both inside and outside my local subnet, with no difference in events or outcomes.
[Code]...
View 2 Replies
View Related
Dec 9, 2009
My CentOS installation correctly recognize my video card and my monitor if I go to System->Preferences->Screen Resolution and set monitor refresh rate to 75 hz, everything works fine, but if I reboot, at startup refresh return to 60 hz.How can I save refresh rate value?
View 4 Replies
View Related
Aug 28, 2009
Is there something that blocks cron from running a shutdown command? I'm doing a daily bounce to break an attack (I have thread about that in security forum), but I always end up doing it manually. The cron log shows it being fired off at the right time...but the server never bounces. I thought maybe I just missed it, but there is nothing in messages that shows the server restarting (unlike when i do it manually, you see the start-up logging).
View 2 Replies
View Related
Feb 22, 2011
when I reboot the server with centos 5.5 the SMB deamon doesn't start?
View 2 Replies
View Related
Apr 6, 2009
I updated centos from 5.2 to 5.3 as recommended:
yum clean all
yum update glibc*
yum update
Update was successful (I didn't see any errors). Then I rebooted pc and found out that my web is extreamly slow. In httpd logs I found: php -> file_get_contents [URL] always dies (timeout error, but somedomain.com is fine, I can telnet it easy on 80) I was wounder if it's update problem and tried yum:
>yum update Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Error: Cannot find a valid baseurl for repo: base
so you doesn't work too... I have no proxies, I tried to reboot pc, I tried: yum clean all
View 1 Replies
View Related
Nov 18, 2009
I have installed Centos and after few days I used it as a web server, database server (MySQL) and have some very important for me applications installed.
Today - I have read about "yum -update" function and I (a dummy one...) tried it. After some minutes the process was finished. But unfortunatelly - my server did not boot any more.
As startup options I have:
CentOS (2.6.18-164.6.1.el5)
CentOS (2.6.18.-164.6.1.el5PAE)
CentOS (2.6.18-128.2.1.el5PAE)
CentOS (2.6.18-128.2.1.el5)
CentOS (2.6.18-128.1.14.el5)
CentOS (2.6.18-92.el5)
I'm not sure what are these options. Anyway - I have tried to choose every one and the result is aways the same : red Hat Nash version 5.1.19.6 starting
Then starts the clock [ok],
Then starts the "udev" [ok]
And then My screen goes to suspend mode, with the text "no signal".
The most important thing is to backup the data from the hard disk. Do I have any chance to repair this installation ?
View 5 Replies
View Related
Nov 20, 2009
I am having a problem trying to get my UPS (APC BACK-UPS ES 750) to be recognized (via USB) on my new CentOS 5.4 system. I had no trouble a while ago getting it to work on an old Fedora Core 3 system, and I don't think the problem is even with the apcupsd package because at the very least, I expect to see the device appear when I plug in the usb cable and use (from the APCUPSD User Manual):
View 7 Replies
View Related
Nov 28, 2009
I have created a yum repository in my local network. Everything seems to be working well except the yum server doesn't remember what was updated, every time I run yum on it the same fies are updated (306 files). And the versions I checked are the same as the files already installed.
____________
yum .conf
[main]
[code]....
View 2 Replies
View Related
Feb 23, 2010
I have a server Hp proliant DL160 G6 with CentOS 5.4 . When I do shutdown -h now it doesn't poweroff.
I try differents options for acpi in menu.lst file. acpi=force, acpi=noacpi,acpi=off,acpi=ht but there's the same problem.
This the stdout when I do shutdown:
Halting system...
md: stopping all md devices.
Completed flushing cache on controller 0
ACPI: PCI interrupt for device 0000:05:00.1 disabled
xenbr0: port 2(peth0) entering disabled state
ACPI: PCI interrupt for device 0000:05:00.1 disabled
Power down.
acpi_power_off called
I show you any specific information about my server:
Reboot works fine
View 3 Replies
View Related
Jun 14, 2010
after i update my Server to 5.5 i get the following error
[root@Linux /]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=addons error was
[Errno 14] HTTP Error 407: Proxy Authentication Required
Error: Cannot find a valid baseurl for repo: addons
i export the proxy but still not working,
View 9 Replies
View Related
Jul 13, 2010
1) Installed Cent os 5.4 in my system (name it as "guest os").
2) Downloaded the full kernel source, and patched the vanilla kernel to export symbol table (2 line change) [URL] (Yes I know that kernel should not be touched, if touched you should not seek help here . but I felt I didnt do any big change in kernel there). Besides we unset the config_smp & config_preempt parameter to make the kernel as not SMP and not preemptive .
3) Then compiled and booted with the new kernel 2.6.18, everything went fine . Now my gust os box is loading fine and I dont have any issue .
So now I need to install this above machine as guest OS in one more XEN machine cent os 5.4 (name it as "xen os").
So we created the image out of the above box "guest os" and added it as VM in xen os . But while booting it always hangs under some error like "/usb device sort of thing" (I dont have the screen where it hangs, but I do have the equivalent xen log from XEN OS linked to [URL] .
1) what the error is, and what need to be changed in my guest os build .
2) In general I am new to this VM and XEN installation, to be frank I am completely zero . Does changing the native os 5.4 to guest os need any change in kernel or something.
3) Does this case possible, install plain cent os in xen machine. After then patch the kernel in VM and boot with that . I guess it should not be possible ...
4) If possible guide me to some documentation where I can learn few basics over this.
View 15 Replies
View Related
Sep 22, 2010
After reviewing the dmesg log, I realize that it does not log all startup messages. Is there a way to configure it or another log to do so?
View 7 Replies
View Related
Nov 6, 2010
I'm trying to get FFMpeg installed on my server, but I'm not having much luck I've managed to get it working with AVI/MOV etc , but now I'm trying to convert into MP4, I get an problem:
root@vps [/etc/apt]# apt-get install ffmpeg
Reading Package Lists... Done
Building Dependency Tree... 50%
Building Dependency Tree... Done
ffmpeg is already the newest version.
0 upgraded, 0 newly installed, 0 removed and 4 not upgraded.
root@vps [/etc/apt]#
[Code]....
View 1 Replies
View Related
Aug 20, 2009
I am trying to monitor a Centos 5.3 box using SNMP and I am having a lot of trouble getting the data that i need from it. Everytime I try to get information from the UCD-SNMP MIB it returns "End of MIB". It is my understanding that UCD-SNMP is a standard package when Net-SNMP is installed and should always be there. Then why can't I access it? I have tried removing the reinstalling Net-SNMP, but that hasn't worked. My server is update date on all it's patches as well. It is quite old hardware, but I don't believe that should affect SNMP from being gathered. Iptables is down, and I cant' even get it from the local machine.
View 1 Replies
View Related
Sep 29, 2009
I have a CentOS 5.3 server, running in a VM. I get the iSCSI session to my Buffalo, but the disk doesn't appear.
Sep 29 09:06:29 qaservice iscsid: iscsid shutting down.
Sep 29 09:06:29 qaservice kernel: Loading iSCSI transport class v2.0-871.
Sep 29 09:06:29 qaservice kernel: iscsi: registered transport (tcp)
Sep 29 09:06:29 qaservice kernel: iscsi: registered transport (iser)
[Code].....
View 2 Replies
View Related
Nov 6, 2009
I'm looking for sm-notify, which should be part of nfs-utils, but isn't.
I need this for NFS over TCP failover. Where can i find it?
View 1 Replies
View Related