Welcome to Geeklog, Anonymous Tuesday, April 14 2026 @ 05:46 pm EDT
Geeklog Forums
what is a cronjob?
Status: offline
baddrink
Forum User
Newbie
Registered: 05/07/07
Posts: 5
Ok im pretty sure i understand a cron job is actually a job that acours at a certain time but for the life of me i cant find any in depth instructions on actually setting one up. Originally i came across cronjob in the gsmap zip file i found here for setting up a google sitemap and it called for running it as a cron job since then ive done some searching on the site and i can only find very little on cronjob , am i overlooking something or can someone help a newbie out?
20
16
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
The cron utility on Unix/Linux systems can run scripts and programs according to specifications in your local crontab file.
If you have a Unix/Linux based server and you can telnet onto it, you can type
man crontab
at the command prompt for instructions.
Or you may want to visit http://en.wikipedia.org/wiki/Crontab .
Some administrators may have a preferred front end in place for setting up crontab files through a user control system like cpanel.
Some administrators may have limits in number or frequency of jobs a user can run.
"A conclusion is the place where you got tired of thinking."--Steven Wright
If you have a Unix/Linux based server and you can telnet onto it, you can type
man crontab
at the command prompt for instructions.
Or you may want to visit http://en.wikipedia.org/wiki/Crontab .
Some administrators may have a preferred front end in place for setting up crontab files through a user control system like cpanel.
Some administrators may have limits in number or frequency of jobs a user can run.
"A conclusion is the place where you got tired of thinking."--Steven Wright
12
19
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
I don't think so. Maybe someone more knowledgeable knows of a hack.
Many hosting services provide one if they allow corn jobs. I think you should check with your administrator or look through any user's gui services provided by your host.
"A conclusion is the place where you got tired of thinking."--Steven Wright
Many hosting services provide one if they allow corn jobs. I think you should check with your administrator or look through any user's gui services provided by your host.
"A conclusion is the place where you got tired of thinking."--Steven Wright
18
17
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
I looked at gsmap.
If set up correctly, the cron job is actually emulated by Geeklog without much from you.
gsmap requires editing lib-custom.php.
The best way would be to take the appropriate section from the gsmap file,
add_to_lib-custom.php,
and add to lib-custom.php .
But remove the duplicate function line from the "add_to" code either by overwriting about line 90-92 in lib-custom.php:
}
or by leaving out the above code, including beginning and ending brackets, when copying from the gsmap add_to file, then carefully pasting between the opening and closing brackets in the above lines.
That sets up the job through Geeklog.
The job interval is set in the Geeklog config.php .
The line is
That interval will have to be set way down to work on a site without heavy traffic as it will be checked only in close proximity to a visit.
I don't use gsmap. Maybe someone else knows more about it.
These indices for Google don't require cron:
http://sourceforge.net/project/showfiles.php?group_id=68255&package_id=67932
and
http://www.geeklog.net/filemgmt/index.php?id=128 .
"A conclusion is the place where you got tired of thinking."--Steven Wright
If set up correctly, the cron job is actually emulated by Geeklog without much from you.
gsmap requires editing lib-custom.php.
The best way would be to take the appropriate section from the gsmap file,
add_to_lib-custom.php,
and add to lib-custom.php .
But remove the duplicate function line from the "add_to" code either by overwriting about line 90-92 in lib-custom.php:
Text Formatted Code
function CUSTOM_runScheduledTask() {}
or by leaving out the above code, including beginning and ending brackets, when copying from the gsmap add_to file, then carefully pasting between the opening and closing brackets in the above lines.
That sets up the job through Geeklog.
The job interval is set in the Geeklog config.php .
The line is
Text Formatted Code
$_CONF['cron_schedule_interval'] = 86400; // Seconds - Default 1 dayThat interval will have to be set way down to work on a site without heavy traffic as it will be checked only in close proximity to a visit.
I don't use gsmap. Maybe someone else knows more about it.
These indices for Google don't require cron:
http://sourceforge.net/project/showfiles.php?group_id=68255&package_id=67932
and
http://www.geeklog.net/filemgmt/index.php?id=128 .
"A conclusion is the place where you got tired of thinking."--Steven Wright
14
20
Quote
Status: offline
baddrink
Forum User
Newbie
Registered: 05/07/07
Posts: 5
Thanks ook i somewhat got it going, i spent a few hours this morning trying to figure out why the sitemap job didnt seem to be working and it wasnt putting out errors , just when i was getting to pissed off for words i looked in my public_html directory and it was there. In my config file i have my path set to www.sitename/geeklog/public_html/ so thats the directory it put it in. I was looking in the top directory of the site, i need to mod this line
$path = $_CONF['path_html'] . $GSMAP_CONF['sitemap_name'];
so that instead of the path_html it goes to the top directory of the site, plus i submitted the sitemap to a google sitemap validator and i got an error about the urlset and schema so i guess ive got more work to do .
Text Formatted Code
// Write the sitemap into file$path = $_CONF['path_html'] . $GSMAP_CONF['sitemap_name'];
so that instead of the path_html it goes to the top directory of the site, plus i submitted the sitemap to a google sitemap validator and i got an error about the urlset and schema so i guess ive got more work to do .
24
16
Quote
Status: offline
baddrink
Forum User
Newbie
Registered: 05/07/07
Posts: 5
Google kicked back everything on my sitemap so i thought i would try the pluggin you sent me a link for called Enhanced Site Index 1.2 . Well now i get a sql error of
I think at this point im going to either shoot the computer or maybe the idiot operating it ( oh yeah thats right im the idiot )
Text Formatted Code
1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY date DESC LIMIT 0, 75' at line 1. SQL in question: SELECT lid, url, title, status, date, hits, rating FROM ORDER BY date DESC LIMIT 0, 75I think at this point im going to either shoot the computer or maybe the idiot operating it ( oh yeah thats right im the idiot )
19
16
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1483
Location:Canada
Enhanced Site Index doesn't work with the current version of Geeklog (as you found out). I have a modified version I can post if you want but I took out file management, Calendar, and the link portion since I don't use these plugins on my site. The Enhanced Site index is very basic and doesn't check what you have installed plugin wise (i.e. if the file management plugin is not installed it still tries to bring up the info and errors out).
I've been meaning to update my site indexes. Maybe, when I have time, I'll create a plugin for this (to make things easier) and incorporate the Google sitemap hack in as well.
One of the Geeklog Core Developers.
I've been meaning to update my site indexes. Maybe, when I have time, I'll create a plugin for this (to make things easier) and incorporate the Google sitemap hack in as well.
One of the Geeklog Core Developers.
15
12
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
OK, I installed gsmap and got it working with validation errors.
You shouldn't change anything in your Geeklog config file if Geeklog is running correctly.
If your Geeklog directory setup is standard, public_html is the top directory regarding public access and that is correct.
On installing sitemap.xml, you should have created a directory ~/geeklog/system/custom .
In that directory should be the file, phpblock_gsmap.php . (It should be readable, -rw-r--r--)
Line 45 of that file should read
$GSMAP_CONF['sitemap_name'] = 'sitemap.xml';
--assuming you have standard directories and you made an empty file in public_html named sitemap.xml .
Be sure you have put the following line as its own block of code somewhere in lib-custom.php:
require_once "custom/phpblock_gsmap.php";
Is it throwing errors because the file is empty, or have you checked the xml with your browser?
Make sure sitemap.xml is readable and writable (-rw-rw-rw-) .
For purposes of testing, crank the cron interval in config.php way down to a 3 or 4 seconds or something. Then be sure to visit your site, then pause, when testing.
Don't leave config.php like that!!!
Check against this topic:
http://www.geeklog.net/forum/viewtopic.php?showtopic=53850 .
(I can only handle one thing at a time. :shock: )
"A conclusion is the place where you got tired of thinking."--Steven Wright
Quote by: baddrink
$path = $_CONF['path_html'] . $GSMAP_CONF['sitemap_name'];
so that instead of the path_html it goes to the top directory of the site,
i looked in my public_html directory and it was there. In my config file i have my path set to www.sitename/geeklog/public_html/ so thats the directory it put it in. I was looking in the top directory of the site, i need to mod this line
Text Formatted Code
// Write the sitemap into file$path = $_CONF['path_html'] . $GSMAP_CONF['sitemap_name'];
so that instead of the path_html it goes to the top directory of the site,
You shouldn't change anything in your Geeklog config file if Geeklog is running correctly.
If your Geeklog directory setup is standard, public_html is the top directory regarding public access and that is correct.
On installing sitemap.xml, you should have created a directory ~/geeklog/system/custom .
In that directory should be the file, phpblock_gsmap.php . (It should be readable, -rw-r--r--)
Line 45 of that file should read
$GSMAP_CONF['sitemap_name'] = 'sitemap.xml';
--assuming you have standard directories and you made an empty file in public_html named sitemap.xml .
Be sure you have put the following line as its own block of code somewhere in lib-custom.php:
require_once "custom/phpblock_gsmap.php";
plus i submitted the sitemap to a google sitemap validator and i got an error about the urlset and schema so i guess ive got more work to do .
Is it throwing errors because the file is empty, or have you checked the xml with your browser?
Make sure sitemap.xml is readable and writable (-rw-rw-rw-) .
For purposes of testing, crank the cron interval in config.php way down to a 3 or 4 seconds or something. Then be sure to visit your site, then pause, when testing.
Don't leave config.php like that!!!
Check against this topic:
http://www.geeklog.net/forum/viewtopic.php?showtopic=53850 .
(I can only handle one thing at a time. :shock: )
"A conclusion is the place where you got tired of thinking."--Steven Wright
15
19
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
Quote by: Laugh
Enhanced Site Index doesn't work with the current version of Geeklog (as you found out).
How odd. I did a GL version test after reading that.
I like enhanced site index and am having no problems.
"A conclusion is the place where you got tired of thinking."--Steven Wright
22
18
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1483
Location:Canada
My bad, I thought their was an issue with the newer versions of geeklog. You do need to have the File Management plugin (the same with Calendar and Links Plugins) installed for it to work or it will error out like above.
One of the Geeklog Core Developers.
Quote by: Ook
How odd. I did a GL version test after reading that.
I like enhanced site index and am having no problems.
Quote by: Laugh
Enhanced Site Index doesn't work with the current version of Geeklog (as you found out).
How odd. I did a GL version test after reading that.
I like enhanced site index and am having no problems.
One of the Geeklog Core Developers.
17
19
Quote
baddrink
Anonymous
Ook the problem with the sitemap i got generated was it was missing www. in front of all of the pages it indexed. I got to looking and only the main page of my site shows as www. and all the rest are just http://sitename.com/xxx . if you put www. in the urls it still works fine but everything i created with geeklog is missing the www is this normal? Also laugh i dont have filemangment pluggin installed so thats probably my problem with. I might install it just to see how it works and see if i like it.
So many pluggins and so little time
So many pluggins and so little time
22
17
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
In your config.php, you need to set $_CONF['site_url'] to 'http://www.whatever....' if you want the www to always show up.
17
17
Quote
All times are EDT. The time is now 05:46 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content