Jump to content

Automatic calling of prestashop module method on fixed interval, to update database values


lkop

Recommended Posts

I am developing a Prestashop backend module without any hooks. I want to call a method included in module on fixed interval (interval can be set in module configuration) to update some database values. Is this possible in Prestashop? If yes, then how?

Link to comment
Share on other sites

So, cron job is the only way I think it is possible. So will there be any problem regarding to permission to edit or execute commands using cron job? What linux user's cron job file should I use for this? It is a standalone module which will be distributed to my different clients, so I don't have any control over deployed machine's environment.

Also crontab for prestashop module is not a solution for me as I am developing a standalone module without any third party module dependency.

Edited by lkop (see edit history)
Link to comment
Share on other sites

You wouldn't need a thirdparty module to achieve this. There might be a php library for it, but it shouldn't be too hard writing it from scratch either. You should probably run the job with the same user as prestashop is running under apache, since your module would need access to the user's crontab.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...