I have a cron job calling some snippets, that should be executed each night a 2. Since now I used CronManager. But I wonder if there is another solution as CronManager gives me some problems, as the newly proposed next run time gets shifted a little bit with each run. I want to get an execution on a certain given time.
So, would it be apropriate to put the snippets call into a res and point the cron job on that res? Or would you recommend any other solution?
You can pretty easily set up a cron job in cPanel. That should run at the same time each night.
You mean cPanel as a hosting Service or as a hosters admin interface? My problem ist not to configure a cronjob but how to deal the snippets in modx together with the cron job.
I meant cPanel as a hosting service. You said your problem was that "run time gets shifted a little bit with each run." I don't think that would happen with a cron job set up in cPanel.
Well, I observed the script now for 5 days with some some little modifications. But still have the same issiu. In these 5 days the execution time shifted from 2 to 2:10.
I dont think I has to do with the hosting. I assume my hoster provides a similar cron job service as cPanel does. I now have the cron run every 5 minutes.
I think, it is the plugin CronManager, which shifts the execution time, maybe because the script sets next execution time after it has finished and adds the time it needs for execution to the former proposed execution time.
So, what can I do? At the moment I think about just putting my scripts in a resource and point my cron on that resource only once at night. (Not realy my favourit) Any considerations to that?
Quote from: BobRay at Dec 02, 2015, 01:41 PMI meant cPanel as a hosting service. You said your problem was that "run time gets shifted a little bit with each run." I don't think that would happen with a cron job set up in cPanel.
Well, I dont think that this is an issue of the hosters cron job but of the modx plugin cronmanager, which rules its own schedule.
I agree, that's why I'm suggesting that you stop using the CronManager extra and instead setup a cron job directly through the host.
Use the URL of the page with your snippet in the cron job command as described here:
http://stackoverflow.com/questions/13259530/using-cron-jobs-to-visit-url