View Issue Details

IDProjectCategoryView StatusLast Update
0003501Composrcorepublic2019-11-19 01:14
ReporterChris GrahamAssigned To 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0003501: Poor-mans-Cron
DescriptionAllow Cron to work via AJAX requests sent in the background of regular page visits.

Do this automatically if Cron has not been set up properly.

Cron should not be flagged as properly running when run via this mode.
Additional InformationReally I'd prefer to encourage people to just set up Cron properly, but there are pros and cons.

 - Saves effort of having to set up Cron
 - Some users may not be able to set up Cron due to lack of knowledge
 - Some users may not be able to set up Cron due to lack of Cron functionality available to them
 - Can be used for background caching on a fresh install, to improve perceived initial slowness (to leave a better first impression)

 - Irregular Cron
 - Infrequent Cron (bots probably wouldn't trigger AJAX, and if we did it via something like an <img> tag then onload wouldn't trigger quickly enough)
 - Likely to cause load spikes
TagsNo tags attached.
Attach Tags
Time estimation (hours)2
Sponsorship open


related to 0002236 closedChris Graham Opportunistic scheduler and background caching 
related to 0003958 non-assigned Opportunistic scheduler 
related to 0003959 non-assigned Cache warm up via Cron 



2018-01-25 23:29

administrator   ~0005402

I approve of this. Some web hosts limit the amount of cronjobs you can run, so if you have several sites (rather than an msn which I imagine would only need cronjob on the main install) then this would be handy. Especially if the sites are not high traffic and don't need regular updates.

Chris Graham

2018-01-25 23:31

administrator   ~0005403

In such a situation I'd just suggest someone chains the CRON tasks.

You could make a simple bash shell script that calls them in sequence.


2018-01-25 23:33

administrator   ~0005404

Last edited: 2018-01-25 23:40

View 3 revisions

Well I didn't know you could chain them so that's an interesting fact to learn. I will have to read up on that. At least one of my sites is running via EasyCron rather than my webhost as the limit on my cheap account (£19.99 for 2 years of hosting) is 3 cronjobs.

I still think this is a good idea, at least initially until you get your site ready to roll and work through the checklist. I must install Composr at least twice a week to try something different or because I've ended up with an error I have no idea how to fix (catalogues mainly, got a couple of bugs to report once I work out how I managed to create them). So I wouldn't want to set up cronjobs in those instances, for it to work (in any fashion) would be useful although I agree it's not the best solution it is a handy thing.

Chris Graham

2018-02-10 15:05

administrator   ~0005493

Last edited: 2019-11-18 21:49

View 3 revisions

If something's really broken you can always ask for help, unless you really did break it yourself. Even then, you can ask on the forums.


1 big problem with Poor Man's CRON I realised is when creating clone test sites. If CRON is going to automatically work, then all kinds of background tasks like birthday emails are going to run from the clone site, spamming real users.
Of course, that could happen for other things like if users have notifications on, but that'd be a much smaller problem.
Ideally someone making a clone site would disable e-mails on it via the mail_queue_debug option, but it takes time to get to the admin config to do that and by then loads of emails could have gone out.

EDIT: I've edited the clone site tutorial to mention disabling email in _config.php.

Issue History

Date Modified Username Field Change
2018-01-25 14:54 Chris Graham New Issue
2018-01-25 23:29 Adam Note Added: 0005402
2018-01-25 23:31 Chris Graham Note Added: 0005403
2018-01-25 23:33 Adam Note Added: 0005404
2018-01-25 23:38 Adam Note Edited: 0005404 View Revisions
2018-01-25 23:40 Adam Note Edited: 0005404 View Revisions
2018-02-10 15:05 Chris Graham Note Added: 0005493
2018-02-10 15:06 Chris Graham Note Edited: 0005493 View Revisions
2019-11-18 21:23 Chris Graham Relationship added related to 0002236
2019-11-18 21:49 Chris Graham Note Edited: 0005493 View Revisions
2019-11-18 23:12 Chris Graham Summary Poor-mans-CRON => Poor-mans-Cron
2019-11-18 23:12 Chris Graham Description Updated View Revisions
2019-11-18 23:12 Chris Graham Additional Information Updated View Revisions
2019-11-19 01:13 Chris Graham Relationship added related to 0003958
2019-11-19 01:14 Chris Graham Relationship added related to 0003959