General :: Setup Do Not Run In The Blank Crontab

Aug 13, 2010

I used to get the below when I ran crontab, but now its disappeared and my tasks I set up do not run in the blank crontab

#lxpr weekly cron job - Kickstart generated entry
0 1 * * 0 /opt/lxpr/lxpr -st /var/lxpr
#lxpr monthly job to clear down old dumps - Kickstart generated entry
0 1 28 * * find /var/lxpr -name "lxpr.`uname -n`*" -type d -a -mtime +30 -exec /bin/rm -r {} ;

View 5 Replies


ADVERTISEMENT

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

Server :: Causing Crontab To Not Email Blank Emails

Aug 3, 2011

I've currently got a crontab line that looks like the following:

Code:
*/5 * * * * /usr/bin/php -q /etc/backend/cron.php | mail -s "Cron script output" whiteydude@gmail.com

The script works fine - it runs every 5 minutes and checks if certain environmental variables are set in place - if they are, it prints an output. If they're not, it dies.

The problem is that when it dies, it still sends me a blank email - one every 5 minutes, every time the cron job runs.

telling it not to send if it's blank?

I'm assuming some type of dirty awk script could do this, but I don't really know my shell well enough to do that.

I'm not good at putting these things into words, so let me write some psuedo code to explain what I mean:

Code:
*/5 * * * * /usr/bin/php -q /etc/backend/cron.php | if (STDOUT != '') { mail -s "Cron script output" whiteydude@gmail.com }

EDIT: Unfortunately I'm running on CentOS, so I can't use mail -E . Apparently that's a FreeBSD thing.

View 5 Replies View Related

CentOS 5 Server :: Crontab Creating Blank Files In Root Directory?

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

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

Fedora :: Crontab Alarm Setup - No Sound

Dec 19, 2009

I am trying to set up an alarm via crontab. I can play music by "/usr/local/bin/mp3blaster /home/burak/Desktop/kemannnnn.mp3" command on terminal. However when I wrote this line in crontab it doesn't play:
04 19 * * * root /usr/local/bin/mp3blaster /home/burak/Desktop/kemannnnn.mp3

View 5 Replies View Related

Slackware :: Setup A Cron Job Using Crontab Entry

May 31, 2010

I am trying to setup a cron job using crontab entry like this 6,16,26,36,46,56 * * * * /usr/bin/fetchmail -k>/dev/null 2>&1 But nothing is happening This is the first time I have attempted using cron as I have settup mutt for my email which is now working great but I would like to have the mail collected every 10 mins The file is saved as mailcron in my /home folder. When i run crontab -l its listed ok but no mail is appearing in mutt.

View 10 Replies View Related

Slackware :: How To Properly Setup Crontab On 13.0 Machine

Dec 3, 2010

I'm running a Slackware64 13.0 machine with the following line at the end of crontab -e:
Code:
@reboot rm -rf /tmp/*
Yet /tmp is not clearing.
This exact same setup is working fine for me on two 13.1 boxes and a -current machine; what gives?

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 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

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 :: Crontab Can't Run / Why Is So?

Feb 1, 2010

I want to run a crontab job but it isnt working. I am writing in the crontab file with crontab -e Then I am waiting time but it isnt working. code...

View 6 Replies View Related

General :: Crontab: 12 3 12 4 4 Cat /etc/passwd?

Jan 5, 2010

If I configure a crontab like below.12 3 12 4 4 cat /etc/passwd I know that the cat command will get executed at the configured time. But where will the output of that command go?If it is something like below, then out put will be routed to /tmp/file1.12 3 12 4 4 cat /etc/passwd > /tmp/file1

View 4 Replies View Related

General :: How To Edit The Job Using Crontab

Jun 1, 2010

I setup a cron job to trigger a script that I wrote every morning at 12:00 AM, but it does not seem to be working.

This is how I edit the job using crontab -e

Why it isn't triggering at 12:00 am every night. If I run the script manually it works just fine so I know is not the script causing troubles.

View 7 Replies View Related

General :: How To Set Cronjob In /etc/crontab

Apr 10, 2011

I know crontab -e sets a cronjob in /var/spool/cron but how do I set a cronjob to run from /etc/crontab? Is there a command used for this or would I have to manually edit a certain file?

View 2 Replies View Related

General :: Set Up A Crontab So That From Machine {which Is 192.168.0.99}?

Dec 5, 2010

I want to set up a crontab so that from my machine {which is 192.168.0.99}whatever I create in a directory called "/information" {suppose some texts files}will be copied to 192.168.0.100 and 192.168.0.101's machine "/readinfo" directory at 5.30 pm. everyday."/readinfo" is directory which is accessible by all users on that machines {192.168.0.100 & 192.168.0.101}is this crontab right?30 5 * * * /bin/cp -rf /information/* 192.168.0.100:/readinfo30 5 * * * /bin/cp -rf /information/* 192.168.0.101:/readinfoI guess first these 100 and 101 machines should allow me {99} ssh connection without passowrd.

View 5 Replies View Related

Server :: Setting Up Sendmail On A Blank RHEL 5.5 Server Setup

Jun 21, 2010

Having some issues setting up sendmail on a (basically) blank RHEL 5.5 server setup. My ultimate goal is to be able to automagically send logs / errors / notifications to ourselves from the server.

Our basic setup is a Win 2003 domain with exchange running on mail.domain.com.au.

I've edited the '/etc/mail/sendmail.mc' and added the :

Code:

line to it.

Also added the domain (domain.com.au) to the '/etc/mail/local-host-names' files

Also edited submit.mc and added

Code:

When I try and send a mail from root or a test user to one of the domain accounts, it seems to go fine, i.e no errors are reported but it never gets delivered.

From the mail logs:

Code:

So it seems to be sent to the queue no problems and when I check the queue :

Code:

Total requests: 0

Not nothing ever gets received. Am I missing something? I have read and read and read but dont seem to be getting any furthur.

So in the end this server doesn't need to do anything except be able to send mail from root to an external mail address.

View 1 Replies View Related

General :: Clock Correction In GNU - Crontab?

Oct 20, 2010

My laptop's clock (Acer Extensa 5220) seems to be slow. I've corrected it 5 minutes forward last week and now have just corrected minute forward again. Is there a program [apart from time servers] to correct clock properly, for example, by shifting it a bit every hour? Is there already a program to put it to crontab or I should hack up a script? Or I should check more things?

I have found that HW clock is right, but system time is slow: about a second each 2.1 hours.
root@vi-notebook:~# dmesg | egrep 'clock|unstable'
[ 0.103785] Switching to clocksource tsc
[ 0.265274] Marking TSC unstable due to TSC halts in idle
[ 0.265514] Switching to clocksource acpi_pm
[ 1.321408] rtc_cmos 00:09: setting system clock to 2010-10-30 00:10:48 UTC (1288397448)
Is placing "hwlock --hctosys" to crontab a right thing?

View 3 Replies View Related

General :: Running Scripts From Crontab

Nov 1, 2010

Im new to linux, using ubuntu 10.04. I have been playing around with crontab and have no problems scheduling a job which runs a script file containing the following command:

However, when I try to do the following in the script file nothing happens..

Similarly the following doesnt do anything either:

Is there something im missing?

View 5 Replies View Related

General :: Commented Out Lines In Crontab Still Run?

Sep 20, 2010

Silly question here. My crontab looks like this:

Quote:
0 22 * * * /usr/sbin/logrotate /var/log/VRTSralus/VRTSralus.logrotate
#0-59/10 * * * * /root/memmon.sh >> /var/log/memmon.txt
0 8 * * 1 /root/SHC.sh
#0 21 * * * /root/scripts/ralus_restart.sh > /dev/null 2>&1

As you can see two of the lines are commented out. However, both commented out commands are still running. I get emails stating that the RALUS agent restarted (another mystery since it's supposed to go to dev null according to the line above), and I can see that the memmon script is also running daily. Am I missing a step? Some other place I should be looking? Commenting out lines in your crontab is pretty much a no-brainer, so I appear to have less than no brain as this is a mystery to me.

View 5 Replies View Related

General :: Crontab - Schedule Job To Run Every Minute?

Apr 14, 2010

I am setting crontab to run a script every minute irrespective of the current hour's value:

Code:

[root@localhost bin]# ls
sec.php showTime.sh
[root@localhost bin]# crontab -l
1 * * * * /root/bin/showTime.sh
[root@localhost bin]#

But it is not working. Does the line mean: "Run this script every day at hour:01"?

View 16 Replies View Related

General :: Crontab Shutdown Not Working?

Jan 2, 2010

I'm running Ubuntu server 8.04.3 with eBox on a Dell GX280. I want to power off my box automatically every night, so as root I added a crontab entry "05 1 * * * /sbin/shutdown -P now". The command runs on schedule but most days the PC goes into a coma instead of powering off. It doesn't respond to key presses or mouse movement or Ctrl-Alt-Delete, I have to push its power button to complete the shutdown. I have tried a variety of alternatives such as "/sbin/shutdown -h" and "runlevel 0", they all behave the same way

View 14 Replies View Related

General :: Remove Line From Crontab?

Aug 26, 2010

I have exactly same line like in crontab and I want to remove it via shell script. How to do it?

Example:
In crontab there are:
*/1 * * * * /home/testdir/testcron.sh >/dev/null 2>&1
line, how to remove it using shell ?

View 14 Replies View Related

General :: Run Crontab At Various Time Zone?

Apr 21, 2011

My server is in CDT. I want to run one script @9.30am of EST5EDT

View 4 Replies View Related

General :: Configuring Crontab In Rhel-5?

Oct 7, 2010

I want to schedule a crontab for shutting down the oracle application services. I created crontab -e by login as oracleuser and added time and run-part(script path to execute the cron). But i unable to execute on the schedule time. exact procedure for creating and execution of cronjobs in RHEL-5.

View 4 Replies View Related

General :: Use Crontab -e To Set It Up Under The Root Account?

Jul 16, 2010

I have set up my crontab and whilst Im logged in and it works (It runs my shell script), however when Im not logged in, the script does not run. Initially I set the time/date to 0 0 * * * (Midnight every day), as this did not work, I tested it with to 0 * * * * (every hour) whilst logged in and the script starts.

I use crontab -e to set it up under the root account..Im sure you dont have to be logged in for it to run?, but maybe im missing a step or just overdosing on Linux and need a holiday:-)

View 3 Replies View Related

General :: Crontab Fail To Start?

Jun 22, 2010

I type this 10,20,30,40,50 * * * * /root/auto.pl

my log file
Jun 23 10:10:01 localhost crond[7702]: (root) CMD (/root/auto.pl)
Jun 23 10:20:01 localhost crond[12022]: (root) CMD (/root/auto.pl)
Jun 23 10:30:01 localhost crond[14610]: (root) CMD (/root/auto.pl)
Jun 23 10:40:01 localhost crond[18676]: (root) CMD (/root/auto.pl)
Jun 23 10:50:01 localhost crond[22402]: (root) CMD (/root/auto.pl)
Jun 23 11:01:01 localhost crond[29476]: (root) CMD (run-parts/etc/cron.hourly)

but my application doesnt run at all. my script is in perl language

View 5 Replies View Related

General :: Crontab Either No Error Doesn't Run

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

General :: Crontab Not Running Php Script?

Apr 18, 2011

I have a crontab that is supposed to run 2 PHP scripts but they never run.

30 */3 * * * php /var/www/html/mkimages.php
0 */3 * * * php /var/www/html/import_historic_data.php

Both of these files are owned by root, is it a permissions thing? How can I get get cron to run the files?

View 13 Replies View Related







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