LinuxQuestions.org
Help answer threads with 0 replies.
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 04-12-2010, 07:16 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
Crontab help required


How would i run /usr/local/sbin/copyfile.sh at 8 p.m today.

What should i write in crontab -e ?
 
Old 04-12-2010, 07:24 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
A quick Googling can answer your question.

http://en.wikipedia.org/wiki/Cron
http://www.unixgeeks.org/security/ne...ix/cron-1.html

Last edited by PMP; 04-12-2010 at 07:37 AM.
 
0 members found this post helpful.
Old 04-12-2010, 07:25 AM   #3
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by pinga123 View Post
How would i run /usr/local/sbin/copyfile.sh at 8 p.m today.

What should i write in crontab -e ?
Try this entry in crontab:
Quote:
0 20 12 4 1 /usr/local/sbin/copyfile.sh
 
Old 04-13-2010, 04:31 AM   #4
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Thanks my problem solved by adding following to cron tab.

00 23 12 4 mon /usr/local/sbin/copyfile.sh
 
Old 04-13-2010, 04:51 AM   #5
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
Quote:
Originally Posted by pinga123 View Post
Thanks my problem solved by adding following to cron tab.

00 23 12 4 mon /usr/local/sbin/copyfile.sh
Is this solution actually does what you explained as the problem.
This will execute the script at 23:00 (11:00 PM).

Please close the thread (using thread tool at the top) if this is solved.
 
Old 04-14-2010, 01:16 AM   #6
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by PMP View Post
Is this solution actually does what you explained as the problem.
This will execute the script at 23:00 (11:00 PM).

Please close the thread (using thread tool at the top) if this is solved.
You are right I later changed the time to 11:00PM
 
  


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
crontab nagavinodh Linux - Newbie 1 12-11-2009 03:30 AM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06: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 03:15 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