ironman Hello dear admin boss ,I have setup cronjob at run at every minutes its working fine but on my website it shows pusher notifications very slow . I wanna execute my cronjob command in 30 seconds for fast working pusher notifications please help me to how to execute crown command in seconds ?/
aapanel_power Hello, brother, the smallest unit of crond scheduling under Linux is minutes. By default, you can’t do second-level tasks. You can write a shell script like this bash/directory/executed script name &
ironman aapanel_power dear boss I created file second-level.sh in the www/server/panel/install and I edited second-level.sh with this code #!/bin/sh while : do command /www/server/php/72/bin/php /home/trdrr/artisan schedule:run sleep 30 #execute every 30 seconds done and I restarted crond but it did not work yet now what I should do ?
aapanel_power ironman Hello, brother, please post your real case, here we will teach based on your real case
ganteng please remove command on this line : command /www/server/php/72/bin/php /home/trdrr/artisan schedule:run it should be /www/server/php/72/bin/php /home/trdrr/artisan schedule:run and execute the file : ./scheduler.sh &
ironman ganteng dear boss where I should execute file ./scheduler.sh & ? your means I should change name of second-level.sh to ./scheduler.sh & ? if yes then where I should execute this file ./scheduler.sh & I am not understanding in short words please tell in some details ?where I should execute this file ./scheduler.sh & ?
ganteng scheduler.sh is just an example, if your filename is second-level.sh then you have to execute it : ./second-level.sh&
ironman ganteng dear boss you did not what I said anyways I tell you I was excited this cronjob for every minute php /www/server/php/72/bin/php /home/trdrr/artisan schedule:run and it was working but my pusher notifications of presence like set online or set coffline comes very late like it comes after one minute then I try to set it 30 seconds through bash but it still coming late ?
ironman aapanel_power Dear Boss its my crown job commands and details * * * * php /path-to-your-installation/artisan schedule:run >> /dev/null 2>&1 * * * * /usr/local/bin/php /path-to-your-installation/artisan schedule:run >> /dev/null 2>&1 * * * * /opt/php71/bin/php /path-to-your-installation/artisan schedule:run >> /dev/null 2>&1 * * * * * * * * The first part * * * * * implies that the command should run every minute The second part php or /usr/local/bin/php is the full path to the installed php command, you may run the following command whereis php to determine it The third part /path-to-your-installation/artisan schedule:run is the actually command of Crypterion that runs your background tasks Please help me to setup these commands ?
ironman aapanel_power according to the cronjob instruction I have added every minute only one command /www/server/php/72/bin/php /home/trdrr/artisan schedule:run it runs when I see in cronjob logs but problem is pusher notifications comes very late and presence also show very late and chat notifications also comes late
aapanel_power ironman Hello brother, this kind of task cannot be added to the scheduled task of the AAPanel panel, because the default server does not support the second-level scheduled task, you directly save the content of the scheduled task in a file ending in .sh, and then execute it bash/directory/file.sh &. If you don’t understand, you can search linux crond on Google
ironman aapanel_power then your means I should remove the current cronjob which I have executed in crontab which is running as a every minute ? the command was in /www/server/php/72/bin/php /home/trdrr/artisan schedule:run and then I should create bash sh file for run this command ? * * * * php /path-to-your-installation/artisan schedule:run >> /dev/null 2>&1 please tell if I m correct I should create this sh file in /www/server/panel/install?
ironman aapanel_power dear boss I get push notifications after one minute due to setup of cronjob every one minute but my problem is notifications are not coming instantly how can it be solve ?
manishpaswan aapanel_power /www/wwwroot/domain.com/game.php I have to set cron in it, it is Openlitespeed server, I am very worried, no one is helping, does any of you know, please help.
aaP_crazykiddodk Why not use websocket or something like that? if PHP setup a js timer that checks every xx seconds