GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Linux
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-May-2006, 10:35
rash_s13 rash_s13 is offline
New Member
 
Join Date: Dec 2005
Posts: 12
rash_s13 is on a distinguished road

cron


Hello,

I want a cgi script to be run every hour and another script ever month.Can this be done by putting those scripts inside cron.hourly and cron.monthly?For hourly,should the machine be on till that hour?

Regards,
Rashmi.
  #2  
Old 07-May-2006, 11:56
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

Re: cron


Hi rash.

Yes you should be able to put your script in those files and they will run as you desire.

I am more familiar with the classic use of cron which is a single file for each user (so that the script is ran as the desired user).

Code:
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND #at 6:10 a.m. every day 10 6 * * * /path/to/script #every two hours at 15 past the hour 15 */2 * * * /path/to/script

Yes, your computer would need to be on at the specified date/time in order for the crontab to work.

Also, you may want to check to see if you have crond running. It should be, but it doesn't hurt to check:
Code:
ps -C crond


Good luck!
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:41.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.