MyBB Community Forums

Full Version: Task isn't Auto Executing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can you provide us the associated plugin ?
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,
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]
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,
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
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,
Any update fron there?
Pages: 1 2