The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Schedule to run every 3 minutes - CRONTAB prashanth_gs SUN Solaris 4 02-20-2007 07:52 AM
Crontab Job - Schedule prashanth_gs SUN Solaris 7 12-04-2006 05:03 AM
schedule many jobs using cron sireesha15 UNIX for Dummies Questions & Answers 1 11-28-2006 11:20 PM
Script Schedule Scrutiny geralex2 Shell Programming and Scripting 2 08-29-2006 03:52 AM
schedule dial-out different ISP's Hansaplast UNIX for Dummies Questions & Answers 2 01-15-2002 03:23 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-22-2005
ashvik ashvik is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 3
How to schedule a job

Hi,

How can i schedule a job, i.e a program named p found at path a/b/c, to run at a time T everyday?

Thanks
  #2 (permalink)  
Old 09-22-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Welcome to the forum.

Use the search facility provided.

cron and crontab
Need tut on Cron info

vino
  #3 (permalink)  
Old 09-22-2005
Abhishek Ghose Abhishek Ghose is offline
Registered User
  
 

Join Date: Sep 2005
Location: Chennai
Posts: 81
Was looking at the job scheduling query and recalled a requirement that I had. It seems in the cron format you cant specify time incrementally i.e. if i want to run sthing every 2 minutes, the only option i have is to enter a command like this:
00,02,04,06,08,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * $HOME/file.sh


Is there a better way?
  #4 (permalink)  
Old 09-22-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
*some* versions of cron allow a syntax such as

*/2 in the minute field to denote "every two minutes"

Check out the man page for the crontab file (man 5 crontab on Linux).

Cheers
ZB
  #5 (permalink)  
Old 09-22-2005
sanjustudy sanjustudy is offline
Registered User
  
 

Join Date: Aug 2005
Location: India
Posts: 17
How to Schedule a job

hai ,

go to /etc
open crontab

specify
* * * * * roots /a/b/c/program name
the stars will be
1. minutes
2.hours.
3.day of the week
4.day of the month
5.month of the year

according what u specfied u can run the job

  #6 (permalink)  
Old 09-22-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Quote:
Originally Posted by sanjustudy
hai ,

go to /etc
open crontab

specify
* * * * * roots /a/b/c/program name
the stars will be
1. minutes
2.hours.
3.day of the week
4.day of the month
5.month of the year

according what u specfied u can run the job

Hmm... lots of incorrect and/or misleading information here.

Firstly, this is the system crontab (under Linux) - as can be seen by the additional field between the scheduling fields, and the command field. This field contains the username of the user as which the command is to run. Now, in this case, I assume the user "roots" is a standard user? If you're refering to the superuser, then the correct username is "root". Also, the ordering of the fields as you've described is way off.

1. minutes
2. hours
3. day of month
4. month
5. day of week

Is the correct ordering of the scheduling fields. Before posting a reply, check that it's correct. If you have any doubts, check the crontab manual page....

Cheers
ZB
Sponsored Links
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0