crond not work after writing to cron log?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers crond not work after writing to cron log?
# 1  
Old 03-31-2011
crond not work after writing to cron log?

Yesterday I was testing out some cron commands and when i was check the /var/log/cron with vi editor I accidentally did :wq instead. Since then the log has not updated and I'm assuming no cronjob is running because looking at the log there's activities everyday

there's some default stuff that runs everyday like run-parts /etc/cron.hourly

since I :wq nothing's happened and the last log was

Mar 30 11:51:01 host crond[216921]: (*system*) RELOAD (/etc/crontab)

I did

[root@host log]# service crond status
crond (pid 195631) is running...
[root@host log]# service crond restart
Stopping crond: [ OK ]
Starting crond: [ OK ]
[root@host log]# vi cron
# 2  
Old 03-31-2011
Check the permissions of the file, they may have changed. You may need to delete it and restart your system logger.
# 3  
Old 03-31-2011
hey corona... what is the command to restart the system logger?
# 4  
Old 03-31-2011
Depends on your system.
# 5  
Old 03-31-2011
actually is this possible... its showing my last run time in August


-rwxr-xr-x 1 root root 1904 Aug 20 2010 /etc/init.d/crond
# 6  
Old 04-01-2011
That's the modification time, not the run time, unless you forced ls to print atimes somehow. Often atimes aren't used these days since the feature's seldom needed and adds a lot of pointless disk writes.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

/usr/sbin/crond: can't lock /var/run/crond.pid,

please tell pre-requisite steps to activate cron. i activated the cron but it not executing the script which i set in crontab entry.through root user i passed the service crond start it get start.but when i go to etc/init.d and passed crond stop command.it gets crond: can't lock /var/run/crond.pid,... (2 Replies)
Discussion started by: umair
2 Replies

2. Shell Programming and Scripting

Execution on cron does not work well

Hallo everyone, this is my first post here and I hope i will learn a lot from you guys. I have the following command that somehow only works interactively, when I put the the following to the cron, it does not work. It suppose to move file from one folder to another folder that's all. ... (7 Replies)
Discussion started by: msetjadi
7 Replies

3. Shell Programming and Scripting

Date command does not work in a KSH when called from Cron

Hi, I'm trying to execute a job on the last day of every month, for which i'm using the following code in my Korn shell script : if ]; then echo allowed only on last day of month. Today is `date +%d` >t.stm echo Tomorrow is `date +%d -d tomorrow` >s.stm exit 0 fi ... ....... (7 Replies)
Discussion started by: devilsadvocate
7 Replies

4. UNIX for Dummies Questions & Answers

Writing a script to work sequentially with bsub

Hi, I am REALLY a newbie of Unix: hope this question is not too odd. Here is my problem: I have to submit jobs to a remote platform (an IBM BCX/5120). To submit I have tobsub < filename.jcf and the .jcf file has usually the following content: #!/bin/bash #BSUB <commands of the bsub>... (1 Reply)
Discussion started by: silky
1 Replies

5. Shell Programming and Scripting

Script doesn't work as expected when run on cron

The script checks for free space stats on Oracle. If there are any tablespaces with more than 85% usage it prints the details of the tablespace. If all the tablespaces have more than 15% free space, then "All tablespaces have more than 15 pct free space" must be printed on the screen. When I run... (2 Replies)
Discussion started by: RoshniMehta
2 Replies

6. Shell Programming and Scripting

Command doesn't work under cron ?

I have defined in cron crontab -l >/FIXENGINE/data/crontab.$(whoami).$(date +%a) The resulting file is named crontab.fixadmin. When I run the above from a command line, the file is named: crontab.fixadmin.Tue (or whatever day I happen to be running) The question is - why do I get... (4 Replies)
Discussion started by: bigjohn-nj
4 Replies

7. Shell Programming and Scripting

script didn;t work in cron !!! @_@

Hi all, I am writing a script to monitor some processes existence in the system. It works perfectly by running the script manually in commend line. However, when I put it under cron to run it failed. Everything time when the variable is null in the if statment. it failed and quitted. Here is... (2 Replies)
Discussion started by: stancwong
2 Replies

8. UNIX for Dummies Questions & Answers

ncopy doesn't work from cron

Hello, I have put the following command in a shell script: ncopy /home/Selma/my_file server2\!INPUT/my_file userpassword (server2 is the remote machine) The script works fine when it is invoked manually, however when it is scheduled to be run from crontab ncopy doesn't work (all of the... (2 Replies)
Discussion started by: Selma
2 Replies

9. UNIX for Dummies Questions & Answers

crond

I noticed that I do not have the crond daemon in my AIX box. I need to create a backup script to run nightly. Where do I find this daemon? Thanks (1 Reply)
Discussion started by: dkbainbridge
1 Replies

10. UNIX for Dummies Questions & Answers

Simple cron job won't work

I have a script in a directory -say users/me/test/ It looks like this: # "bkup" - copies specified files to the user's ~/Backup # directory after checking for name conflicts. a=$(date +%T) cp $1 ~/test/Backup/$1.$a It copies file.txt from current directory and timestamps the name of it of... (4 Replies)
Discussion started by: coregan
4 Replies
Login or Register to Ask a Question