• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

peppeocchi / php-cron-scheduler / 91
100%
master: 98%

Build:
Build:
LAST BUILD BRANCH: v4.0
DEFAULT BRANCH: master
Ran 01 Sep 2017 08:02AM UTC
Jobs 3
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
91

push

travis-ci

peppeocchi
 Allow run() to be executed multiple times  (#24)

* Allow run() to be executed multiple times

The current code expects the run() to be called only once. This is
fine if you start the scheduler from cron each minute and re-initialize
it each time. If you want to manually run the scheduler, or maybe
have a lot of jobs you do not want to init each minute, it would
be useful to call run() multiple times in the lifetime of the
scheduler.

In this case the collected data of the last run should be reset.
the executedJobs, failedJobs and outputSchedule.

* Allow queued jobs to be removed

If the scheduler is used to do multiple runs then it would be useful
to reset all queued Jobs. Currently the only way to do this is by
re-creating the scheduler object. But if the object is injected in the
code then this is not practical..

* Fix StyleCI analysis failure

Comment format fixed.

* Allow run() to be executed multiple times

After discussion with @peppeocchi make the re-running manually
triggered. So added a resetRun() method which can be called before
each run(). Also adjusted the test for this.

* Allow run() to be executed multiple times

The isDue check on the jobs is not provided a datetime in the run()
method. This means they use the creation time of the job as the
'current' time to compare against.

Most likely this creation time is approx the time run() is called so
normally this is no problem. But if setting up the job schedule takes
more time then I would say, using the creation time as run time is
unexpected. And if you run run() multiple times then it will always
run the same jobs because the time never changes.

So now provide an explicit run time for all jobs, which is the same
for all jobs each run.

* Fix StyleCI analysis failure

Remove empty line

297 of 297 relevant lines covered (100.0%)

30.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 91.1 01 Sep 2017 08:00AM UTC 0
100.0
Travis Job 91.1
2 91.2 01 Sep 2017 08:00AM UTC 0
100.0
Travis Job 91.2
3 91.3 01 Sep 2017 08:01AM UTC 0
100.0
Travis Job 91.3
Source Files on build 91
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #91
  • f8374aff on github
  • Prev Build on v2.x (#88)
  • Next Build on v2.x (#97)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc