TeamSpeak 3 - Rank/Level up system - v1.0.0

Do you think this script should continuously be updated?

  • Yes!

  • No.


Results are only viewable after voting.
Status
Not open for further replies.

Archie

Member
Feb 8, 2016
129
8
53
How do I update the Ranking system? I don't want to delete everything. Will it work if I just link it with the database?
 

strux1

Member
Mar 19, 2016
30
1
43
It stops everytime i also set the cronjob maybe i did it false can someone make a screenshot of his cronjob settings maybe i did something wrong ???:(
 

Wrath X

Member
Oct 2, 2015
96
34
53
I think your problem is not about your crontab configuration, but here my crontab configuration.

a9Cmvvl.png
 

Qraktzyl

Retired Staff
Contributor
Nov 2, 2015
997
723
161
It stops everytime i also set the cronjob maybe i did it false can someone make a screenshot of his cronjob settings maybe i did something wrong ???:(
You need to check your logs to see why it's stopping!
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,855
381
Because i got confused, can somebody type the whole command for the crontab?
 

Wrath X

Member
Oct 2, 2015
96
34
53
Because i got confused, can somebody type the whole command for the crontab?
1- Open crontab with this :
Code:
# sudo crontab -e
"-e" means edit.

2- After this code add this code to crontab's last empty line:
Code:
*/10 * * * * sudo -u www-data php /YOUR_RANKSYSTEM_PATH/worker.php check >/dev/null 2>&1

3- And save it ( ctrl + o -> YES(enter) ctrl + x ) ( I am using nano text editor, this is for nano )

Command explanation:
Code:
.---------------- minute (0 - 59)
|  .------------- hour (0 - 23)
|  |  .---------- day of month (1 - 31)
|  |  |  .------- month(1 - 12)
|  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
|  |  |  |  |
*  *  *  *  * command to execute

Code:
">" is for redirect
"/dev/null" is a black hole where any data sent, will be discarded
"2" is the file descriptor for Standard Error
">" is for redirect
"&" is the symbol for file descriptor (without it, the following 1 would be considered a filename)
"1" is the file descriptor for Standard Out

Therefore >/dev/null 2>&1 is redirect the output of your program to /dev/null. Include both the Standard Error and Standard Out.
cron will only email you if there is some output from you job. 
With everything redirected to null, there is no output and hence cron will not email you.

a9Cmvvl.png

Source:
1-
https://en.wikipedia.org/wiki/Cron
2- http://unix.stackexchange.com/quest...ull-21-mean-in-this-article-of-crontab-basics
 
Last edited:

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,855
381
1- Open crontab with this :
Code:
# sudo crontab -e
"-e" means edit.

2- After this code add this code to crontab's last empty line:
Code:
*/10 * * * * sudo -u www-data php /YOUR_RANKSYSTEM_PATH/worker.php check >/dev/null 2>&1

3- And save it ( ctrl + o -> YES(enter) ctrl + x ) ( I am using nano text editor, this is for nano )

Command explanation:
Code:
.---------------- minute (0 - 59)
|  .------------- hour (0 - 23)
|  |  .---------- day of month (1 - 31)
|  |  |  .------- month(1 - 12)
|  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
|  |  |  |  |
*  *  *  *  * command to execute

Code:
">" is for redirect
"/dev/null" is a black hole where any data sent, will be discarded
"2" is the file descriptor for Standard Error
">" is for redirect
"&" is the symbol for file descriptor (without it, the following 1 would be considered a filename)
"1" is the file descriptor for Standard Out

Therefore >/dev/null 2>&1 is redirect the output of your program to /dev/null. Include both the Standard Error and Standard Out.
cron will only email you if there is some output from you job.
With everything redirected to null, there is no output and hence cron will not email you.

a9Cmvvl.png

Source:
1-
https://en.wikipedia.org/wiki/Cron
2- http://unix.stackexchange.com/quest...ull-21-mean-in-this-article-of-crontab-basics
Thank you for your explanation @qwelethe ! I already know how to use cron tab though. I just got confused with the * check >/dev/null 2>&1 * that @Qraktzyl said that needs to be removed!
But thank you my friend!
 

Qraktzyl

Retired Staff
Contributor
Nov 2, 2015
997
723
161
Thank you for your explanation @qwelethe ! I already know how to use cron tab though. I just got confused with the * check >/dev/null 2>&1 * that @Qraktzyl said that needs to be removed!
But thank you my friend!
I didnt say anything about removing something, I actually insisted for it to stay.
 

Wrath X

Member
Oct 2, 2015
96
34
53
Thank you for your explanation @qwelethe ! I already know how to use cron tab though. I just got confused with the * check >/dev/null 2>&1 * that @Qraktzyl said that needs to be removed!
But thank you my friend!
If you want to see Errors or Outputs you need to delete this part it is true. After that crontab send you mails about error or outputs, I guess :D

Or you can edit like this example:
Code:
*/10 * * * * sudo -u www-data php /YOUR_RANKSYSTEM_PATH/worker.php printf > /var/log/error_log_ranksystem
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,855
381
Can someody help me with that error???
Code:
Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 's Property★ | '),('B6DgwIytbTDnwoTUfp3g9iuE1AE=', '24', '0', '0', '0', '0', '8' at line 1
)
 
Status
Not open for further replies.
Top