LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2010, 10:57 AM   #1
deelinux
Member
 
Registered: Nov 2009
Posts: 35

Rep: Reputation: 15
crontab


Hi
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

Any suggestions ?



#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 {} \;
 
Old 08-13-2010, 11:00 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
sorry but i don't understand you question.

can you provide some more info.
 
Old 08-13-2010, 11:46 AM   #3
deelinux
Member
 
Registered: Nov 2009
Posts: 35

Original Poster
Rep: Reputation: 15
all is ok now

the info in the crontab is default..

and my tasks run ok

Cheers
 
Old 08-13-2010, 11:51 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
can you tell what is the problem and what is the resolution so it will help other member.
 
Old 08-14-2010, 05:01 AM   #5
deelinux
Member
 
Registered: Nov 2009
Posts: 35

Original Poster
Rep: Reputation: 15
Hi

When I set up the crontab I accidently deleted the contents, but this was not really the issue.

I then set up my cron tab task, and thought it was not working.

I wanted to test my task by running it every minute, just to see it working, but I had set the times in-correctly.

I eventully learnt that to run a task every minute I had to use the below format

0-59 * * * * /tmp/my_script.sh

So it always worked, it was my lack of understanding...

Rgds

D
 
Old 08-14-2010, 05:08 AM   #6
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
Code:
*/1 * * * * /tmp/my_script.sh
you can also use */1 to run task every minute.

Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06:07 AM
crontab ghartl1 Linux - Newbie 9 06-05-2009 11:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 08:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 05:03 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM


All times are GMT -5. The time now is 08:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration