Community

Forums » SEPHP Help and Tips

Task Scheduler

    • 25 posts
    July 3, 2018 11:25 AM EDT

    I'm having some issues with my task scheduler it does not seems to be running? I reset all the actions and I have not seen them update in a few days?? Should I reboot? How can we fix this?

     

    Peter Gruessing

    www.galify.com

    • 2292 posts
    July 3, 2018 11:29 AM EDT

    Try the different settings to see if it works with different trigger methods, https://support.socialengine.com/php/customer/portal/articles/1662422-admin-panel---settings->-task-scheduler

    Check your logs for the task scheduler and also for your error logs in the log browser.

    Check your server error logs for any possible issues such as something blocking it from running.

    Ensure mod_security is off https://support.socialengine.com/php/customer/portal/articles/1649350-socialengine-requirements

    • 25 posts
    July 3, 2018 12:11 PM EDT

    Also having issues where I am the onl;y one logged in put the chat shows all my friends logged in and availability to chat when they are clearly not logged in?? How does that happen?

     

    Peter Gruessing

    www.galify.com

    • 2292 posts
    July 3, 2018 2:47 PM EDT

    That is all handled with the task manager. If the task manager isn't running, things will do that as it isn't clearing the who is online details. They aren't actually online. It is just the count that is messed up due to the task not running.

  • July 4, 2018 10:14 AM EDT

    Yeah Sometimes it can get caught in a time out. I have this happen to me on a regular basis.

    • 74 posts
    July 10, 2018 10:03 AM EDT

    The task scheduler has MANY problems - starting with the fact that it is not precise at all and that you will not be able to have a task run very frequently no matter what (if you use cUrl method you may be able to get close to once per minute, but even with cUrl precision is not ensured)

    For our project we had to build a task managing system from scratch, as our project involves chatrooms and live action

  • gs
    • 750 posts
    July 10, 2018 12:46 PM EDT
    David said:

    The task scheduler has MANY problems - starting with the fact that it is not precise at all and that you will not be able to have a task run very frequently no matter what (if you use cUrl method you may be able to get close to once per minute, but even with cUrl precision is not ensured)

    For our project we had to build a task managing system from scratch, as our project involves chatrooms and live action

    Are you able to list specifics in a bug report so SE can help or at least validate and put into plans to fix for V5?

    • 74 posts
    July 11, 2018 10:52 AM EDT

    I had exchanged with them quite a few tickets back at the time i was working on that - whether they will make some use of those I don't know

    They did told me though that they were aware of some problems with the tasks system.

    I didn't manage though to isolate the bug

    In total absence of help or documentation, it was in the end cheaper to just build an alternative system

    Donna is a hero and works with great generosity and abnegation - but Social Engine definitely should give more tech support


    This post was edited by David at July 11, 2018 10:53 AM EDT
    • 25 posts
    August 24, 2018 6:54 PM EDT

    Elshara,

     

     This is happening again even after a reboot! What did you do to restart the task scheduler?

     

    Peter Gruessing

    www.galify.com

    • 54 posts
    August 26, 2018 1:16 PM EDT

    I have a new install of the latest SE on a dedicated server. No themes. No plugins except SE. The task scheduler keeps failing. I am using cURL and even when it runs nothing is recorded in the log. I would like to move to cron. I am looking for a list of all processes I need to include. Does anyone have a list.  I have rebooted server it restarts and then stops.  My hosting experts conclude its an issue with SE.  Very disappointing - I was hoping after abandoning SE 3 years ago and now returning the basic tasks script would be mostly bug free. Cant open the community without at least the mail running. Can someone direct me to a cron list.  Would anyone know why the log is empty even if a task runs?  Thanks.


    This post was edited by Miami Shade at August 26, 2018 8:44 PM EDT
    • 2292 posts
    August 27, 2018 4:38 AM EDT

    That's odd as it works fine here and on my own sites. My main site is on a separate server from my ScriptTechs demo site (both hosted at BryZar) and the tasks run without issues using cURL. Are you sure the process isn't being blocked somehow? I see no issues here with the tasks either. I don't know if mod_sec would block that but the recommendations do say not to have it enabled. 

    • 54 posts
    August 27, 2018 12:54 PM EDT

    I can say when it works it appears as it should.  I have verified mod_sec is disabled.  The most frustrating part is when I select a task to run now it does'nt.  A user needs to verify their email address and will wait for hours for the background mailer to run.  My hosting company has verified the server settings are exactly as described as the requirements.  I have nothing but SE and its normal plugins.  I have watched the browser reload multiple times when I enable auto refresh (as though its triggering tasks) but nothing more often then not results.  I think another 50$ for support is the next step :(

    My hosting company says they will gladly set up all the cron jobs but are looking for info on that - any idea where that documentation is?

    Thanks 

    • 2292 posts
    August 27, 2018 1:25 PM EDT

    I don't have info on crons as I've only used cURL or javascript. I do know that the mailer does have a delay unless you change the settings in Mail settings. The delay is to ensure the server doesn't get bogged down if using server mail (not recommended) rather than a mail service such as SendGrid. We use SendGrid. I also use it on my sites but have tried Sparkpost too. 

    Have you tried testing with the mail delay disabled (set it to send immediately instead of the delay) just to see if that part works. If it doesn't, I would say to check to see if the ports are being blocked.

    We (support) doesn't help with server settings or crons so I don't think buying support would help. This really seems like some server conflict/setting - something. I did ask a core developer this morning and we tested again on a staging site and the tasks ran. We also tested by setting the demo to use Javascript and it works too. https://demo.socialengine.com/admin/tasks

    He said he recommends to check the server for some "server config issue blocking cURL". He also said tasks don't all run at once. They have a delay built in and run one at a time. 

    You could try to change hosts if they can't nail down the issues.

    • 54 posts
    August 27, 2018 7:26 PM EDT
    Thanks Donna for your help on this. I have switched to JavaScript and some of the tasks have run. Some are still a day without running. I cannot get tasks to run on demand though. I thought I remember seeing in the docs if you need help with creating cribs jobs to contact support. Do you think they won’t help with crons?
    • 25 posts
    August 27, 2018 9:47 PM EDT

    All,

        I reentered the cron information and it woke backup! I think SE needs to work on this in the next revision!

     

    Peter Gruessing

    https://www.galify.com 

       

    • 307 posts
    August 27, 2018 11:41 PM EDT

    I just took a peek at mine and can confirm that all of my scheduled tasks are running without hiccup... 

    • 2292 posts
    August 28, 2018 4:59 AM EDT

    Thanks for confirming that the default task manager works with cURL @ITLJames. Since you host at cazaratech, and I host at BryZar (which I own with the owner of Cazaratech) then it seems perhaps a hosting issue as Ray said. There has to be something being blocked or not set up right @Miami Shade. 

    As for crons, no I can't help with crons and I work support. If you have support, you can send the ticket but since it's a server thing I don't think we can help. I'll ask if we can update the documents for crons though.

    • 2292 posts
    August 28, 2018 5:00 AM EDT
    • 54 posts
    August 29, 2018 2:28 PM EDT

    @Donna - Thank you everyone for your help.  When I switched to Javascript only the first three jobs, job queue, mailer and cache would run the others haven't run for over 36 hours.  That being said maybe they only run when a change occurs - I do not know.  Thanks for that link Donna I had previously tried to add a cron but unsuccessfully - the code needed to be edited from the one displayed (I had included the entire string).  I contacted my hosting company and they set up a cron that appears to be running as expected.  Hopefully this resolves my issue.

  • August 29, 2018 6:16 PM EDT

    Issues with the task scheduler usually are resolved by setting all settings to "1" under task scheduler settings. this forces the time out to end as the cycle begins anew. I figured that out when you have a long max php request time. Either that, or reboot the server.