Jump to content

Is there a way to run a function within my module asynchronously as a background process?


hgotfred

Recommended Posts

So I have a addon module...

I have a method called "migration" in the client controller of the module and I have a separate function within the "migration" controller method which I want to execute asynchronously, as to immediately return to the client from the "migration" method and do the work afterwards.

How do I do this in whmcs? I tried using exec() to run the function as a php script but didn't get it to work. Does this have something to do with exec() running the script outside the WHMCS system context?

Are there any fool proof methods for this in WHMCS?

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated