forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Wed Oct 18, 2017 10:09 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sat Jan 14, 2012 7:14 am 
Offline

Joined: Sat Jan 14, 2012 7:08 am
Posts: 48
Location: Ukraine
Dear Kestas.
We've faced the problem on our site dedicated to Diplomacy game Diplomail.Ru. We use your scripts. Many thanks for that.
The problem is that after 30 minutes (trigger time) server is going down with a message (no processing for 30 minutes and awaiting the problem to be resolved) - I go to AdminCP and Reset process time. And then everything is going well next 30 minutes (triggerTime).
In fact I found that scripts didn't want to make changes in site cache values in "wD_Misc" table. So we always got wrong amount of online players on the homepage. But when I run gamemaster.php from AdminCP the changes are made. Can you help us with trouble.
Thanks a lot.

Yuri aka Flame

_________________
"There is nothing in the world more majestic than this idiotic Galicia" (GAL)
Jaroslav Hasek


Top
 Profile  
 
PostPosted: Sat Jan 14, 2012 1:08 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
You need to setup a cron process that calls the gamemaster-script every few minutes.
From the manual:
Code:
=> Start a processing cycle
Now you need to set the system up so that games are automatically processed. This
means running gamemaster.php?gameMasterSecret=[yoursecret] every 5 minutes or so
from an automated script, via cron for example. Here is an example crontab:

For example here is my cron line:
*/5    *       *       *       *       /usr/bin/wget -O - 'http://webdiplomacy.net/gamemaster.php?gameMasterSecret=12345' >/dev/null 2>&1
Oliver


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 6:50 am 
Offline

Joined: Sat Jan 14, 2012 7:08 am
Posts: 48
Location: Ukraine
Thanks, I'll try and let you know the result.
Besides, what about sharing variant statistics scripts from VDiplomacy as I wrote you previously?

_________________
"There is nothing in the world more majestic than this idiotic Galicia" (GAL)
Jaroslav Hasek


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 7:56 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
You can get all of my scripts from gitub.
https://github.com/Sleepcap/vDiplomacy


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 8:41 am 
Offline

Joined: Sat Jan 14, 2012 7:08 am
Posts: 48
Location: Ukraine
Sleepcap wrote:
You need to setup a cron process that calls the gamemaster-script every few minutes.
From the manual:
Code:
=> Start a processing cycle
Now you need to set the system up so that games are automatically processed. This
means running gamemaster.php?gameMasterSecret=[yoursecret] every 5 minutes or so
from an automated script, via cron for example. Here is an example crontab:

For example here is my cron line:
*/5    *       *       *       *       /usr/bin/wget -O - 'http://webdiplomacy.net/gamemaster.php?gameMasterSecret=12345' >/dev/null 2>&1
Oliver


The same... automatically info is not updated (online players) - damn!
Can I include cron line into index.php????

_________________
"There is nothing in the world more majestic than this idiotic Galicia" (GAL)
Jaroslav Hasek


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 8:44 am 
Offline

Joined: Sat Jan 14, 2012 7:08 am
Posts: 48
Location: Ukraine
Sleepcap wrote:
You can get all of my scripts from gitub.
https://github.com/Sleepcap/vDiplomacy


Is it enough to add/replace files or I should do some changes with my DataBase, (new/modified) tables?

_________________
"There is nothing in the world more majestic than this idiotic Galicia" (GAL)
Jaroslav Hasek


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 1:32 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Flame wrote:
The same... automatically info is not updated (online players) - damn!
Can I include cron line into index.php????

No. You need to call the script from a cronjob that does this every 5 minutes (or 15 if you want) You need to ask your webspace-provider how the cron-things work on your server.


Top
 Profile  
 
PostPosted: Sun Jan 15, 2012 1:35 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Flame wrote:
Sleepcap wrote:
Is it enough to add/replace files or I should do some changes with my DataBase, (new/modified) tables?


I've added another README-file.
Basically for the reliability-rating things you need to add some Database entries, but there is another sql-install in the install-directory for this.
But beware, I'm not that good at PHP, and can't help you much with this install.
If you just need some additional scripts you can just download them from the repository and add them to your install.


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 11:56 am 
Offline

Joined: Sat Jan 14, 2012 7:08 am
Posts: 48
Location: Ukraine
YES! Everything is working already. Thanks a lot. Now I know what is CRON and how it works. ;)

_________________
"There is nothing in the world more majestic than this idiotic Galicia" (GAL)
Jaroslav Hasek


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group