Not Solved Task isn't Auto Executing
#11
Not Solved
Can you provide us the associated plugin ?
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#12
Not Solved
PMed you the Plugin,
you can have a look Smile
though I don't think its dependent upon the plugin except for those setting options.

Regards,
Discord: Prince#4000
Reply
#13
Not Solved
Two things are important imho: settings and table alteration (poststats_month)

I made tests and the task worked well. I first use my account as user ID, and after a simple member uid.
I don't use crontab but the usual way (task.php image).
Tasks log Wrote:test task 3 minutes ago Post Statistics for this month have been reset.
test task 10 minutes ago Post Statistics for this month have been reset.

[Image: ue6MLF4.png]
[Image: 0jicLgE.png]
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#14
Not Solved
Hmm,
Have you tried to do something like:
Removing the task image from the templates so it can't be executed automatically,
Then going into incognito mode and load the task.php manually without logged in
And see if it works?

Also have you tried to feed tid of a private forum ?(which can't be accessible for members/guests)?

Thanks for the appreciated help
Regards,
Discord: Prince#4000
Reply
#15
Not Solved
The forum where is the tid I test is accessible only for admin and global moderators, the task ran ok with and admin account and a member one.
If you run the task.php file using php-cli, it's alway without being logged. I'll have a look on this way, but I'd like to have your crontab line to check if the trouble doesn't come from this part
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#16
Not Solved
Here is the cron settings( its actually a systemd timer which runs the mybb.service):

Service:-
File: /etc/systemd/system/mybb.service
[Unit]                                                                          
Description=MyBB Tasks                                                          
                                                                                
[Service]                                                                       
User=admin                                                                      
ExecStart=/usr/bin/php /home/<path of forum root>/task.php

Timer to run the service:-
File: /etc/systemd/system/mybb.timer
[Unit]                                                                    
Description=Runs MyBB tasks every 10 sec                                  
                                                                          
[Timer]                                                                   
OnBootSec=5min                                                            
OnUnitActiveSec=10s                                                       
Unit=mybb.service                                                         
                                                                          
[Install]                                                                 
WantedBy=multi-user.target

I run it on a CentOS
Got those from this tutorial: https://community.mybb.com/thread-211078.html
Regards,
Discord: Prince#4000
Reply
#17
Not Solved
Any update fron there?
Discord: Prince#4000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)