Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

cron on other channels not working

Junior Spellweaver
Joined
Jul 30, 2020
Messages
163
Reaction score
33
Hey guys would you please help me, my cron works on saint and war channel but doesn't work on any other channels.

here's the saint
logfile=/home/cabal/logs/saint_channel.log
echo "`date`: Vaikalitan Starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL Forcecalibur channel-----..\033[0m"
/sbin/service WorldSvr_0X_0X restart

here's the other channels
logfile=/home/cabal/logs/treasure.log
echo "`date`: Channel Starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL channel-----..\033[0m"
/sbin/service WorldSvr_0X_0X restart

I'm kinda new to this one. thanks for you understanding hope you will help me!.

I tried searching but are left unanswered.
 
RaGEZONE VIP
[VIP] Member
Joined
Oct 10, 2019
Messages
198
Reaction score
455
Hey guys would you please help me, my cron works on saint and war channel but doesn't work on any other channels.

here's the saint
logfile=/home/cabal/logs/saint_channel.log
echo "`date`: Vaikalitan Starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL Forcecalibur channel-----..\033[0m"
/sbin/service WorldSvr_0X_0X restart

here's the other channels
logfile=/home/cabal/logs/treasure.log
echo "`date`: Channel Starting" | tee -a $logfile
echo -e "\n\033[0;32m..-----Starting up CABAL channel-----..\033[0m"
/sbin/service WorldSvr_0X_0X restart

I'm kinda new to this one. thanks for you understanding hope you will help me!.

I tried searching but are left unanswered.

You can check the schedule in the directory /etc/cron.d/
 
Upvote 0
Junior Spellweaver
Joined
Jul 30, 2020
Messages
163
Reaction score
33
I did arrange them in today's number (4 - Thursday) then arrange it to auto restart in a few minutes
If I finish editing the cron file in example 15:11, I'll arrange it to auto restart in 15:15. But it won't work, it only works and nation war and saint channels
 
Last edited:
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Oct 10, 2019
Messages
198
Reaction score
455
I did arrange them in today's number (4 - Thursday) then arrange it to auto restart in a few minutes
If I finish editing the cron file in example 3:11, I'll arrange it to auto restart in 3:15. But it won't work, it only works and nation war and saint channels
Submit the contents of your cron files here. Did you create a new war-channel cron file or did you use an existing one?
 
Upvote 0
Junior Spellweaver
Joined
Jul 30, 2020
Messages
163
Reaction score
33
I used an existing one

The Contents:

45 19 * * 6 root /home/cabal/start_saint.sh
* 21 * * 6 root /home/cabal/stop_saint.sh
45 19 * * 5 root /home/cabal/start_arcane.sh
* 21 * * 5 root /home/cabal/stop_arcane.sh
30 16 * * */1 root /home/cabal/start_treasure.sh
* 18 * * */1 root /home/cabal/stop_treasure.sh
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Oct 10, 2019
Messages
198
Reaction score
455
I used an existing one

The Contents:

45 19 * * 6 root /home/cabal/start_saint.sh
* 21 * * 6 root /home/cabal/stop_saint.sh
45 19 * * 5 root /home/cabal/start_arcane.sh
* 21 * * 5 root /home/cabal/stop_arcane.sh
30 16 * * */1 root /home/cabal/start_treasure.sh
* 18 * * */1 root /home/cabal/stop_treasure.sh

I would remake them like this (to avoid ambiguity and possible surprises)
Code:
45 19 * * 6 root /home/cabal/start_saint.sh
0 21 * * 6 root /home/cabal/stop_saint.sh
45 19 * * 5 root /home/cabal/start_arcane.sh
0 21 * * 5 root /home/cabal/stop_arcane.sh
30 16 * * * root /home/cabal/start_treasure.sh
0 18 * * * root /home/cabal/stop_treasure.sh

But that’s not the problem. I can assume that you do not have run permissions set for your scripts. Try the commands:
Code:
chmod 0700 /home/cabal/start_arcane.sh
chmod 0700 /home/cabal/stop_arcane.sh
chmod 0700 /home/cabal/start_treasure.sh
chmod 0700 /home/cabal/stop_treasure.sh
Also check what is being logged when running your scripts:
/var/log/cron
/var/log/messages
 
Upvote 0
Junior Spellweaver
Joined
Jul 30, 2020
Messages
163
Reaction score
33
I would try this, thank you very much for this!



#Request to close this thread. My question was answered thank you so much! it now fully works



I would remake them like this (to avoid ambiguity and possible surprises)
Code:
45 19 * * 6 root /home/cabal/start_saint.sh
0 21 * * 6 root /home/cabal/stop_saint.sh
45 19 * * 5 root /home/cabal/start_arcane.sh
0 21 * * 5 root /home/cabal/stop_arcane.sh
30 16 * * * root /home/cabal/start_treasure.sh
0 18 * * * root /home/cabal/stop_treasure.sh
this part, when you don't put a number in the last asterisk, it will auto restart every minute.


But that’s not the problem. I can assume that you do not have run permissions set for your scripts. Try the commands:
Code:
chmod 0700 /home/cabal/start_arcane.sh
chmod 0700 /home/cabal/stop_arcane.sh
chmod 0700 /home/cabal/start_treasure.sh
chmod 0700 /home/cabal/stop_treasure.sh
Also check what is being logged when running your scripts:
/var/log/cron
/var/log/messages

thank you for this. this is where I saw what was really happening.
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Oct 10, 2019
Messages
198
Reaction score
455
this part, when you don't put a number in the last asterisk, it will auto restart every minute.
The minute start occurs because your minutes are set with an asterisk. I replaced it with zero, now the script will run at 21:00 and 18:00, respectively. */1 as a day of the week means it starts every 1 day. You will get the same effect by using just an asterisk and this will be more correct.
 
Upvote 0
Junior Spellweaver
Joined
Jul 30, 2020
Messages
163
Reaction score
33
The minute start occurs because your minutes are set with an asterisk. I replaced it with zero, now the script will run at 21:00 and 18:00, respectively. */1 as a day of the week means it starts every 1 day. You will get the same effect by using just an asterisk and this will be more correct.

I see, thanks for the help, really appreciated it. :thumbup::thumbup::thumbup::thumbup:. All good now :thumbup1::thumbup1:
 
Upvote 0
Back
Top