LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 09:57 AM   #1
deelinux
Member
 
Registered: Nov 2009
Posts: 39

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, 10:00 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

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

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

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, 10:51 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

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

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, 04:08 AM   #6
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

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

Regards,
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:08 PM.

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
Open Source Consulting | Domain Registration