How do you create a "Crontab" file?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How do you create a "Crontab" file?
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
I have a cgi script that pulls emails from a pop3 account and creates tickets for these emails. The script only works when it is called...so I need to set up some type of script or file that will automatically "call" the file in regular intervals....I've done a lil research and I think I need a "crontab".

Anyone know how to create this type of file and where I would upload it on my server?

Any help is appreciated. tia



Back to top Reply with quote
#2   re: How do you create a "Crontab" file?
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
Telli - I did a search and found a generator..it gave me the following:

*/5 * * * * /home/virtual/site38/fst/var/www/cgi-bin/scripts/pop2pipe.cgi > /dev/null


After the code, it gave the following instructions:

SSH or telnet into your account.

At the prompt, type in 'crontab -e'. This will open up your crontab file, or create a new one if it doesn't exist.
When this file opens, you will see other cron jobs listed in here, or if you haven't any - you'll see a bunch of lines with '~' on them.

Use the cursor to go down until you can't move the cursor down any more. This is where you start your new line. Press 'o' to insert a new line.

Press 'o' to insert a new line. If you want to edit a line, press 'i'.
Copy the code above, then right click into your SSH or telnet client to paste the above code in. This should all go in as a new line.

Press the 'esc' key to exit out of edit mode.

To save the changes and exit, type the following in: ZZ
If you want to exit without saving changes, type in: :q!

Once you have exited, to view the new entry in your crontab file type crontab -l in at the prompt. This will list the contents of your crontab file.


Back to top Reply with quote
#3   re: How do you create a "Crontab" file?
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
is this possible on a codezhosted server?



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Sure you just do it a little differant you manually enter it into the cron file in the etc directory.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: How do you create a "Crontab" file?
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
which file in the etc directory are you referring to?

In the etc folder I see:

cron.d (folder)
cron.daily (folder)
cron.monthly (folder)
cron. weekly (folder)

cron.daily is the only folder with files in it:

00updatestats
rmattachments

I tried to add a line to both of these files and reupload through ftp - but I didn't have permission to write to the file.



Back to top Reply with quote
#6   re: How do you create a "Crontab" file?
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 47
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Eagerly awaiting Telli's Linux prowess.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Actually that is correct you cannot edit them through the ftp only root has perm's for that. You will have to use SSH you can get a free tool for that called putty if you do a search on google. Submit your info here [ Register or login to view links on this board. ] and I will activate SSH on your account for you.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: How do you create a "Crontab" file?
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
sent info per that link. Please let me know when it's activated.



Back to top Reply with quote
#9   re: How do you create a "Crontab" file?
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 47
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Okay, we're using putty.exe and SSH in, but we can't do anything. It allows us to login, but no commands work. I'm a newb, so go easy. After logging in I typed crontab -e and got nothin' I appreciate your patience.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#10   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
This will require you to some reading about accesing via shell. You will need to use a pico (text editor for DOS) to the editing and make sure the directions are for a linux server. If you require more assistance then use the [ Register or login to view links on this board. ] feedback please.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum