No Code Attached Yet
avatar PhilETaylor
PhilETaylor
27 Dec 2021

Steps to reproduce the issue

Create a scheduled task to Sleep for 5 seconds with
Execution Rule = Interval, Minutes
Interval in Minutes = 60

In Options enable Web cron and copy your secret URL - mine is, note no ID= in the url:

http://example.com/index.php/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&hash=ireiiA30GL9TN4VHGYk5

it says "By default, requesting this base link will only run tasks due for execution"

Expected result

Visit your url = note it hangs for 5 mins...

This should mean that on first run it should sleep for 5 seconds, then should never run again until 60 mins have elapsed, and then on the next run It would sleep for 5 seconds. Correct?

Visit your url = note it hangs for 5 seconds...
then in 1min
Visit your url = note it hangs for 5 seconds...
then in 1min
Visit your url = note it hangs for 5 seconds...

Actual result

Visit your url = note it hangs for 5 seconds... check Job Execution History - note the times have changed
then in 1min
Visit your url = note it hangs for 5 seconds... check Job Execution History - note the times have changed
then in 1min
Visit your url = note it hangs for 5 seconds... check Job Execution History - note the times have changed
then in 1min
Visit your url = note it hangs for 5 seconds... check Job Execution History - note the times have changed

basically on every load of the web cron url, the task is being fired regardless of the schedule...

If you enable logging for your task you can also see its running on every call..

2021-12-27	23:40:56	INFO	Running task#07 '1sleep1'.
2021-12-27	23:40:56	INFO	Task> Starting 5 timeout
2021-12-27	23:41:01	INFO	Task> 5 timeout over!
2021-12-27	23:41:01	INFO	Successfully finished task#07 in 5.01 (net 5.01) seconds.
2021-12-27	23:41:03	INFO	Running task#07 '1sleep1'.
2021-12-27	23:41:03	INFO	Task> Starting 5 timeout
2021-12-27	23:41:08	INFO	Task> 5 timeout over!
2021-12-27	23:41:08	INFO	Successfully finished task#07 in 5.01 (net 5.01) seconds.
2021-12-27	23:41:11	INFO	Running task#07 '1sleep1'.
2021-12-27	23:41:11	INFO	Task> Starting 5 timeout
2021-12-27	23:41:16	INFO	Task> 5 timeout over!
2021-12-27	23:41:17	INFO	Successfully finished task#07 in 5.01 (net 5.01) seconds.
2021-12-27	23:41:19	INFO	Running task#07 '1sleep1'.
2021-12-27	23:41:19	INFO	Task> Starting 5 timeout
2021-12-27	23:41:24	INFO	Task> 5 timeout over!
2021-12-27	23:41:24	INFO	Successfully finished task#07 in 5.01 (net 5.01) seconds.

@ditsuke

avatar PhilETaylor PhilETaylor - open - 27 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 27 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Dec 2021
avatar PhilETaylor PhilETaylor - change - 27 Dec 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 27 Dec 2021
avatar ditsuke
ditsuke - comment - 28 Dec 2021

On it

avatar ditsuke
ditsuke - comment - 28 Dec 2021

Please test #36461

avatar richard67 richard67 - change - 28 Dec 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-12-28 09:39:16
Closed_By richard67
avatar richard67 richard67 - close - 28 Dec 2021
avatar richard67
richard67 - comment - 28 Dec 2021

Closing as having a pull request. Please test #36461 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment