Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-08-14, 06:57 PM   #1
Tekster
Formerly known as TekAngel
 
Tekster's Avatar
 
Join Date: Feb 2007
Location: Valley of the Sun
Posts: 1,951
Send a message via ICQ to Tekster
Dumb Q - What is a cron job?

...and how do you set one up? (Blogs Automater)

I feel like such a dumb ass. TA
__________________
Mr. Eros Free Porn Links
iPhone Porn Phone-Pics
Tekster is offline   Reply With Quote
Old 2008-08-14, 07:03 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
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).
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2008-08-14, 07:22 PM   #3
Ms Naughty
old enough to be Grandma Scrotum
 
Ms Naughty's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 1,408
Send a message via ICQ to Ms Naughty
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.
__________________
Promote Bright Desire
Ms Naughty is offline   Reply With Quote
Old 2008-08-14, 07:25 PM   #4
Star Man
A boy without mischief is like a bowling ball without a liquid center
 
Star Man's Avatar
 
Join Date: Feb 2006
Location: clevel.......don't make me say it!
Posts: 436
Quote:
Originally Posted by TekAngel View Post
I feel like such a dumb ass. TA
Don't feel bad Tek Angel,I clicked on this thread thinking I was going to learn a new way to degrade woman!

Actually I'd love to use cron to automatically update my site daily but have no clue how to do it.
__________________
good luck
Star Man is offline   Reply With Quote
Old 2008-08-14, 08:21 PM   #5
Ramster
Life is good
 
Ramster's Avatar
 
Join Date: Apr 2003
Location: Ottawa, Canada
Posts: 11,682
Send a message via ICQ to Ramster Send a message via AIM to Ramster
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.
__________________
Pornstar Legends | Live Cam Model Shows | Hungarian Girls
Skype: robmurray999
Ramster is offline   Reply With Quote
Old 2008-08-14, 08:24 PM   #6
T Pat
You can now put whatever you want in this space :)
 
T Pat's Avatar
 
Join Date: Aug 2003
Location: Paridise
Posts: 3,244
Send a message via ICQ to T Pat
Hey Mike I sent in a support ticket to Sparky to get the cronjobs setup for my BA
__________________
How To Keep An Asshole In Suspense

I'll Tell You Later
T Pat is offline   Reply With Quote
Old 2008-08-14, 08:45 PM   #7
LeRoy
"Young dumb and full of cum"
 
LeRoy's Avatar
 
Join Date: Jun 2007
Location: Porn Valley
Posts: 2,370
Send a message via ICQ to LeRoy Send a message via AIM to LeRoy Send a message via Yahoo to LeRoy
Quote:
Originally Posted by cd34 View Post
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).
Hi Cd34,

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?
LeRoy is offline   Reply With Quote
Old 2008-08-14, 09:16 PM   #8
LD
wtfwjd?
 
LD's Avatar
 
Join Date: May 2007
Posts: 2,103
Quote:
Originally Posted by T Pat View Post
Hey Mike I sent in a support ticket to Sparky to get the cronjobs setup for my BA
Yep, that's what I did, too. They can do it in their sleep...give yourself a break....
__________________
Artisteer Wordpress Theme Generator Create Custom Themes!
My Little Network
LD is offline   Reply With Quote
Old 2008-08-14, 09:26 PM   #9
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
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.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2008-08-14, 09:36 PM   #10
Star Man
A boy without mischief is like a bowling ball without a liquid center
 
Star Man's Avatar
 
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
Star Man is offline   Reply With Quote
Old 2008-08-14, 09:58 PM   #11
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Quote:
Originally Posted by D2222 View Post
Hi Cd34,

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?
cron could do an export on a 'scheduled' basis from xcart (I think xcart's quickbook export feature is called from a script) and then the output attached to an email, but, having it automatically update quickbooks may not work.

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'
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2008-08-14, 10:00 PM   #12
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Quote:
Originally Posted by Star Man View Post
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?
sometimes. Most of the time cron is in a control panel and can be somewhat easily modified. I think virgohippy has a regular cron call a 'wrapper' that he has decide what needs to be executed -- so that way, his cron entry never changes and he can just modify his script to do whatever actions he requires.

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
cd34 is offline   Reply With Quote
Old 2008-08-14, 11:04 PM   #13
virgohippy
Madness is like gravity. All it takes is a little... push.
 
virgohippy's Avatar
 
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.
virgohippy is offline   Reply With Quote
Old 2008-08-14, 11:51 PM   #14
Star Man
A boy without mischief is like a bowling ball without a liquid center
 
Star Man's Avatar
 
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
Star Man is offline   Reply With Quote
Old 2008-08-15, 12:00 AM   #15
LeRoy
"Young dumb and full of cum"
 
LeRoy's Avatar
 
Join Date: Jun 2007
Location: Porn Valley
Posts: 2,370
Send a message via ICQ to LeRoy Send a message via AIM to LeRoy Send a message via Yahoo to LeRoy
Quote:
Originally Posted by cd34 View Post
cron could do an export on a 'scheduled' basis from xcart (I think xcart's quickbook export feature is called from a script) and then the output attached to an email, but, having it automatically update quickbooks may not work.

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'
Thanks cd34.

Helpful as always
LeRoy is offline   Reply With Quote
Old 2008-08-15, 12:17 AM   #16
Tekster
Formerly known as TekAngel
 
Tekster's Avatar
 
Join Date: Feb 2007
Location: Valley of the Sun
Posts: 1,951
Send a message via ICQ to Tekster
Quote:
Originally Posted by T Pat View Post
Hey Mike I sent in a support ticket to Sparky to get the cronjobs setup for my BA
I am going to try and figure it out first, if I run into a problem I will do the same as you. |smurf| (I just like the Smurf)
__________________
Mr. Eros Free Porn Links
iPhone Porn Phone-Pics
Tekster is offline   Reply With Quote
Old 2008-08-15, 12:19 AM   #17
Tekster
Formerly known as TekAngel
 
Tekster's Avatar
 
Join Date: Feb 2007
Location: Valley of the Sun
Posts: 1,951
Send a message via ICQ to Tekster
Quote:
Originally Posted by Cleo View Post
....

CronniX is a wonderful easy to use Mac application that I use for setting up crontabs.
Thanks Cleo, that looks like it would help. |smurf| (I really like the Smurf)
__________________
Mr. Eros Free Porn Links
iPhone Porn Phone-Pics
Tekster is offline   Reply With Quote
Old 2008-08-15, 12:39 AM   #18
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Quote:
Originally Posted by Star Man View Post
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?
cron will 99.9% of the time already be running on the web server you're on. Windows/IIS calls it AT if I recall.

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
of course, that would send any output to the trashbin, so, if there was an error, you wouldn't know about it. Removing -O /dev/null and the 2>&1>/dev/null would have it send email to the account that the cron was created under.

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
cd34 is offline   Reply With Quote
Old 2008-08-15, 03:55 AM   #19
Star Man
A boy without mischief is like a bowling ball without a liquid center
 
Star Man's Avatar
 
Join Date: Feb 2006
Location: clevel.......don't make me say it!
Posts: 436
Cool,thanks cd34
__________________
good luck
Star Man is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 02:15 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc