Jump to content

How to boostrap another cron job


Recommended Posts

I've created a module that integrates our install of WHMCS with another application. Because the integration is implemented via web service, I am queuing activity so that I can run it off in the background rather than making the user wait. This is all pretty standard stuff and is already implemented. However, I now need to figure out how to kick off that job. Creating a new cron job is easy enough, but once I'm inside the job, how do I bootstrap properly so that I can use WHMCS's database connection, logging functionality, etc.?

 

I did see in the docs that you support integrating with the daily cron job, but I need to run far more frequently than that. I have an idea for a really hacky workaround should this not be supported, but it sure seems like there should be an easy way to do this.

 

If this is in fact not supported, what's the best workaround? As I said, I have an idea for a hack, but it's pretty nasty....

 

BTW, it looks like someone else asked the same basic question here:

 

http://forum.whmcs.com/showthread.php?40126-New-cron-job

 

Unfortunately, there were no useful replies. It's been over a year since that post, though, so perhaps something has changed since then.

 

Thanks.

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