Hi all.
I have Yii-based web app which is used as admin area to manage timetable of tasks auto-run.
Each task has last start time and last end time. These attributes should be updated outside of
the web app - in the cron script which is actually running tasks.
Is it possible (and correct) to amend classes generated during Yii-scaffolding process (model and CRUD generation)
and use them outside of web app generated by Yii ?
My idea to solve such situation is the following:
-
Add a couple of methods into the model class (within web app) with names like ‘updateStartTime’ and ‘updateEndTime’
-
Include (somehow) web app initialization into cron script, get access to model class and use the methods above.
Is it the correct approach ? Maybe I am planning something wrong and it is not good design solution ?
I am not very experienced app designer, any help will be great. Thanks in advance.