|
|
|
|
|
|
|
|
|
|
|
#1 |
|
A boy without mischief is like a bowling ball without a liquid center
Join Date: Feb 2006
Location: clevel.......don't make me say it!
Posts: 436
|
So if I have a specific cron set on my server to update at midnight would I have to bug my host again if I suddenly wanted to change the settings?
__________________
good luck
|
|
|
|
|
|
#2 | |
|
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
Quote:
Generally though, cron isn't as difficult as a lot of people make it out to be.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
|
|
|
|
|
|
#3 |
|
Madness is like gravity. All it takes is a little... push.
Join Date: Feb 2006
Location: California
Posts: 1,679
|
Sparky speaks the truth, I did write my own cronjob wrapper a short while back. It wasn't so much to add/edit/remove jobs (much easier then writing a wrapper) as much to insure only one entity makes changes to my databases at a time.
__________________
~Warm and Fuzzy.
|
|
|
|
|
|
#4 |
|
A boy without mischief is like a bowling ball without a liquid center
Join Date: Feb 2006
Location: clevel.......don't make me say it!
Posts: 436
|
Maybe I can understand it just enough to use it.It would be pretty handy to have around.I hope I don't sound too dumb here cd34 but where the heck do I start to set up cron? Is this a program I download?Is it already included with my TGP script?Do I have to get something from my host?
![]()
__________________
good luck
|
|
|
|
|
|
#5 | |
|
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
Quote:
To use it, you would input a string of symbols/numbers and the path to the script and what you wanted it to do. If you wanted to have it call a maintenance script every hour at the top of the hour, the entry would look like: Code:
0 * * * * /usr/bin/wget -O /dev/null http://url.com/maintenance.php 2>&1>/dev/null The first field is the minute, the second is the hour -- the rest are usually not used often, but they are day of month, month, day of week. So, if you wanted something to run every 5 minutes, the first part would be: */5 * * * * To run on the 15s, you can do something like: */15 * * * * or 0,15,30,45 * * * * As you can see, its pretty flexible and you can do quite a bit with it. Running a task every monday at midnight would look like: 0 0 * * 1 (1 = Monday. 0 & 7 = Sunday) Some webhosts have a control panel that hides some of the complexity figuring out the numbers -- and there are webpages that allow you to calculate what the resulting line would look like. crontab generator is but one example. Getting your cron job installed on the server can sometimes require ssh access, or, your webhost to handle it through the control panel or a trouble ticket. Some scripts do attempt to create the jobs themselves with some success depending on how the webhost runs their security.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
|
|
|
|
|
|
#6 |
|
A boy without mischief is like a bowling ball without a liquid center
Join Date: Feb 2006
Location: clevel.......don't make me say it!
Posts: 436
|
Cool,thanks cd34
__________________
good luck
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|