![]() |
Dumb Q - What is a cron job?
...and how do you set one up? (Blogs Automater)
I feel like such a dumb ass. |pokefun|TA |
cron is a utility for executing a task at a particular time.
If I recall, Blogs automator has a suggested entry of a few cron lines that need to be added. If you are comfortable with ssh, you can do that, or, you can use the cron job entry in your control panel (advanced will allow you to just paste in their entries). |
TA... I'm still vague on cron jobs too. I *almost* got what Sparky just said. It would probably help if one of my hosts actually had a control panel for me to use.
|
Quote:
Actually I'd love to use cron to automatically update my site daily but have no clue how to do it. |
In dumb man's terms (that's what I understand, LOL) a cron job is added by your host (it's always easier to ask them to do it) to the server to tell a particular script to do something at a specific time.
For example a tgp script can have a cron that will update it at midnight or 3am each and every day. As sparky said, blogs automater has one that tells the blog to update. |
Hey Mike I sent in a support ticket to Sparky to get the cronjobs setup for my BA
|
Quote:
Can the cron be used with quickbooks and X-Cart? I have a client "CN2 Data" that wants the orders from the cart automatically entered into quickbooks. Can the cron feature do this? |
Quote:
|
I just think of cron as a really convoluted time clock with very hard to use tabs.
I always love it when I setup a crontab to do something once a day but due to the wonderful user friendliness of Vi and the cron interface end up having it do it once each second. CronniX is a wonderful easy to use Mac application that I use for setting up crontabs. |
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?
|
Quote:
the .iif format is well documented so, that's not an issue, but, they would still have to possibly doubleclick the attachment or go into quickbooks and hit 'import' |
Quote:
Generally though, cron isn't as difficult as a lot of people make it out to be. |
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.
|
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? |huh
|
Quote:
Helpful as always :) |
Quote:
|
Quote:
|
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. |
Cool,thanks cd34 |thumb
|
All times are GMT -4. The time now is 06:37 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc