Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Run a controller via static PHP file  (Read 5292 times)

yonghan

  • Guest
Run a controller via static PHP file
« on: February 08, 2016, 06:35:34 AM »
Hi admins, is it possible to execute a controller via static PHP file like opencart does? Opencart has Action and Front engine that enables admin run a controller via cron job file. I would like to add a cron job file for an extension and I'm stuck with the process. An is the task Manager just for database backup routine only? Thanks a lot.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Run a controller via static PHP file
« Reply #1 on: February 25, 2016, 11:45:46 AM »
Yes. You can have your special controllers (task-controllers) that can be run as task steps. Every step should describe into "task_steps" table of database and must be included into task that is in "tasks" table.  Then put php-file file in cron and run task.php file inside your public_html folder. After start it looking for "scheduled" tasks in the table "tasks" and run all steps by sort order.
You can create sheduled backup in admin to view database data as example.

sorry for delay. we are working hard on new version release..
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Run a controller via static PHP file
« Reply #2 on: February 25, 2016, 12:21:54 PM »
I need to find time to write dev manual for task process. It is coded in backup and in admin communication in 1.2.6

Possibly you can help us with the manual. Thank you.
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5776
  • Karma: +274/-2
    • View Profile

yonghan

  • Guest
Re: Run a controller via static PHP file
« Reply #4 on: February 29, 2016, 02:43:30 PM »
Hi

@abolabo: Thanks for the reply. I will test the scheduled backup in admin in order to understand how the task works. That's ok on the delay. I know you guys are working on the new release.

@eCommerce Core: May i see the comments for the task process? I will try my best to help on the manual.

@Basara: Thanks for the docs link. I will read it

 

Powered by SMFPacks Social Login Mod