1
Cronjob/PHP
Postat av HylsicH den 12 Augusti 2010, 20:15
16 kommentarer · 86 träffar
Hej,
Jag är ägaren av ett Web-baserat MMORP Mafia spel.
Jag använder mig utav loopia.
De mitt script behöver är Cronsupport utav
;
varje dag(loopia supported)
varje timme(loopia supported)
var 5:e minut(loopia supported)
varje minut(INTE supported)
Då allting är bra förutom att loopia inte stödjer varje minut scriptet.
Jag tänkte som såhär att ok, jag kan ju köra det var 5:e minut bara att jag ökar värdena på scriptet till 5 istället för en.
Förklaring:
The values that you should put in each box are seperated by spaces, eg put all the text before the first space in the Minute box, then Hour, then Day, then Month, then Weekday, then finally Command. You will have to Commit Changes and select Advanced (Unix Style) after entering each one to make a new box appear for the next one. (If no cPanel and on a linux server with shell access, use the cron program to import these crons manually. If no cPanel and no linux with shell, you're a bit screwed and should consider changing servers)
Time based things will work only if the cron jobs has properly set up .
Time based things depends upon cron-jobs such as recovery time , jail function etc ,energy refill etc .
Jail and Hospital - every 1 minute
Users stats such as enery , health refill - every 5 minutes.
jag testade även inuti scriptet att ändra (osäker på om det är rätt) $db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0");
$db->query ("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");
$db->query("UPDATE users SET traveltime=traveltime-1 WHERE traveltime > 0");
$db->query("UPDATE users SET bguard=bguard-1 WHERE bguard>0");
$db->query(" UPDATE users SET bguard=0 WHERE bguard
Jag är ägaren av ett Web-baserat MMORP Mafia spel.
Jag använder mig utav loopia.
De mitt script behöver är Cronsupport utav
;
varje dag(loopia supported)
varje timme(loopia supported)
var 5:e minut(loopia supported)
varje minut(INTE supported)
Då allting är bra förutom att loopia inte stödjer varje minut scriptet.
Jag tänkte som såhär att ok, jag kan ju köra det var 5:e minut bara att jag ökar värdena på scriptet till 5 istället för en.
Förklaring:
The values that you should put in each box are seperated by spaces, eg put all the text before the first space in the Minute box, then Hour, then Day, then Month, then Weekday, then finally Command. You will have to Commit Changes and select Advanced (Unix Style) after entering each one to make a new box appear for the next one. (If no cPanel and on a linux server with shell access, use the cron program to import these crons manually. If no cPanel and no linux with shell, you're a bit screwed and should consider changing servers)
Time based things will work only if the cron jobs has properly set up .
Time based things depends upon cron-jobs such as recovery time , jail function etc ,energy refill etc .
Jail and Hospital - every 1 minute
Users stats such as enery , health refill - every 5 minutes.
jag testade även inuti scriptet att ändra (osäker på om det är rätt) $db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0");
$db->query ("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0");
$db->query("UPDATE users SET traveltime=traveltime-1 WHERE traveltime > 0");
$db->query("UPDATE users SET bguard=bguard-1 WHERE bguard>0");
$db->query(" UPDATE users SET bguard=0 WHERE bguard






