cronstatus | A phpbb 3 extension showing Cron Status | Model View Controller library
kandi X-RAY | cronstatus Summary
kandi X-RAY | cronstatus Summary
A phpbb 3 extension showing Cron Status
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main function .
- Get cron tasks
- Sorts an array
- Get cron data
- Enable a cron step
- Update files .
- Load cron status
- Check if we can enable .
- Get the cron status module .
- Get the update data .
cronstatus Key Features
cronstatus Examples and Code Snippets
Community Discussions
Trending Discussions on cronstatus
QUESTION
This is my cronjob.php file and in mysql database I have a row['cronjob']
and its value is test1.php
and that is just the name of one of my php files that need to be executed when datetime row equal or less than current time, while the cron job runs.
I thought I can do a while-loop
then get the name of the file from the cronjob row
and then execute it if the datetime is equal or less then current time when the corn job runs. Please see below:
ANSWER
Answered 2017-Oct-19 at 10:11I would suggest you change tactic a little. Consider the following file structure:
- /jobs
- /jobs/JobInterface.php
- /jobs/MyFirstJob.php
- /jobs/MySecondJob.php
- /jobs/<.. more jobs ..>
- /cron.php
Each file that ends in Job in the jobs folder contain a class that implements the interface found in JobInterface.php. This interface requires all Jobs to have a "run" method.
You then either use autoloading or you simply include all the files in the jobs folder manually at the top of cron.php, which is still the file you run.
In the "cronjob" field in your database, you would have the name of the job (i.e. class name), not the name of file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cronstatus
Upload the extension with "[Upload Extensions](https://github.com/ForumHulp/upload)".
Check that you have uploaded the correct files.
Click Enable.
You can install this extension on the latest version of [phpBB 3.1](https://www.phpbb.com/downloads/) or on the latest development version of [phpBB 3.1-dev](https://github.com/phpbb/phpbb3) by doing the following:.
Download the extension. You can do it [directly from phpbb.com](https://www.phpbb.com/customise/db/extension/cronstatus/) or by downloading the [latest ZIP-archive of master branch of its GitHub repository](https://github.com/ForumHulp/cronstatus/archive/master.zip).
Check out the existence of the folder /ext/forumhulp/cronstatus/ in the root of your board folder. Create folders if necessary.
Copy the contents of the downloaded cronstatus-master folder to /ext/forumhulp/cronstatus/.
Navigate in the ACP to Customise -> Extension Management -> Manage extensions -> Cron Status.
Click Enable.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page