Author Topic: Cron Job sites  (Read 3182 times)

0 Members and 1 Guest are viewing this topic.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Cron Job sites
« on: March 30, 2016, 10:04:27 PM »
My web host GoDaddy has limited cron job service so I have been using the free Cron Job.org www.cron-job.org which is very easy to set up and use.  However I am getting a lot of failures, 20% or more.  At present 54 cron jobs per hour (1 at 2 minutes, 1 at 5 min, 1 at 10 min, 1 at 15 min, and 1 at 30 minutes).  Last check there were 5 failures in the last 25.
Quote
Details×Fetched URLhttp://www.komokaweather.com/j-template/update/cumulus.php?password=xxxxx Status   0 Unspecified response code

Any suggestion for alternate cron job services?
 
Paul

Offline smokie

  • Senior Member
  • **
  • Posts: 51
    • Newquay Cornwall. UK
Re: Cron Job sites
« Reply #1 on: March 31, 2016, 02:14:37 AM »
I use https://www.easycron.com/user/register they have a free plan and paid plans used them for over 2 years as I was overloading my hosts so shifted some here. I have the starter plan. Had no issues with them.
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Cron Job sites
« Reply #2 on: March 31, 2016, 05:02:45 AM »
Paul, I use the same CRON job service and have 1 failure in the last 30 days.... this is most likely due to your server being overloaded or very slow to respond, or maybe something else, but my point is that I am not sure if finding an alternative CRON job provider will make much difference in this case

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: Cron Job sites
« Reply #3 on: March 31, 2016, 08:28:30 AM »
hi paul

do you have a pc running 24/7 ?

if so i can write you a simple script where you neither need no internal cron jobs or using external cron job services only downside you need a pc/mac running 24/7

I've set it up for a couple of people only issue is when the power fails you have to restart it  but i guess its the same for most things.
also there is various software the can run scheduled actions through your computer to remote file , unfortunately I'm not to in touch with windows based software but on mac there is a in built script automator that can be configured to kick remote files locally or over the internet .

but as Jachym quotes if your server is overloading and cpu is running at max well most of the time you will get similar issues . 

you need to also check your error logs if the cron fails they could be opening and generating a very large log file that needs to be opened before writing to each time there is an error . i found a very large 304mb error log file on my old server due to failed cron jobs over a 5 day period when i migrated to new server. opening a large error log each time can impact the rest of your site , its like downloading a low resolution movie file eveyrtime ..

probably time to clean out some unused stuff and do a full maintenance servers are like cars !! .


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Cron Job sites
« Reply #4 on: March 31, 2016, 08:37:26 AM »
In my template download file there are instructions how to do this using the Windows built-in task scheduler, you just need one small program that is also included in the download package. But to be quite honest, the task scheduler is not ideal, it slows down the pc, and it also won´t solve anything if the server is for some reason overloaded, I think the external CRONs are just as reliable.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6371
    • Valentine Nebraska's Real-Time Weather
Re: Cron Job sites
« Reply #5 on: March 31, 2016, 09:37:18 AM »
PaulMy I don't really have any cron jobs (scheduler) running I know of. Unless the saratoga scripts are doing it. Maybe someone could explain this a little better. I'm also on GoDaddy. 
Randy

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Cron Job sites
« Reply #6 on: March 31, 2016, 09:49:43 AM »
Hi Randy,
with Ken's help on his Blitzortung map scripts I have GoDaddy do the cron jobs.  However GoDaddy only allows 5 cron jobs per hour and Ken shared a trick to make that 10 per hour.  This is working fine without any errors.

I then use Cron Job.org to run the others.  For the Meteotemplate MySQL database updates I run 10 min crons, as well as a couple for Brian's PWS Homeweatherstation.  And also use it to get the Hikvision IP image converted from a file name with date/time to an image.jpg file which I did once a minute but now doing it less often.

Brian/Jachym,
Yes my weather computer is 24/7 along with UPS.  I will look into doing it different from your suggestions.

Thanks for your suggestions and help.
Paul

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6371
    • Valentine Nebraska's Real-Time Weather
Re: Cron Job sites
« Reply #7 on: March 31, 2016, 10:39:22 AM »
Thanks for the explanation Paul.
Randy

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: Cron Job sites
« Reply #8 on: April 01, 2016, 06:42:54 AM »
Hi Randy,
with Ken's help on his Blitzortung map scripts I have GoDaddy do the cron jobs.  However GoDaddy only allows 5 cron jobs per hour and Ken shared a trick to make that 10 per hour.  This is working fine without any errors.

I then use Cron Job.org to run the others.  For the Meteotemplate MySQL database updates I run 10 min crons, as well as a couple for Brian's PWS Homeweatherstation.  And also use it to get the Hikvision IP image converted from a file name with date/time to an image.jpg file which I did once a minute but now doing it less often.

Brian/Jachym,
Yes my weather computer is 24/7 along with UPS.  I will look into doing it different from your suggestions.

Thanks for your suggestions and help.
Paul

ok paul we don't have UPS we have Solar panels which is reliable for 9 months mid-march to november a year however it doesn't fix the internet access as power outages here are frequent 3 times per week on average and its a district widespread problem sometimes country wise !  .

cron jobs there are a few solutions just finding the one thats suits your setup/configuration but do take a look at those errors logs if there quite large it will impact your site performance.  have a nice weekend and hope you find a good solution.

brian

Offline AWL

  • Forecaster
  • *****
  • Posts: 727
    • Ardmore Weather Live
Re: Cron Job sites
« Reply #9 on: April 04, 2016, 09:44:29 PM »
At present 54 cron jobs per hour (1 at 2 minutes, 1 at 5 min, 1 at 10 min, 1 at 15 min, and 1 at 30 minutes). 

Just out of curiosity are the crons set to run at those exact times. 2 minutes after the hour, 5 minutes after the hour, 10 minutes after the hour ect. If that is the case at the 30 minute mark you are trying to run all 5 jobs at the same time and at the 10 minute mark you are running 3 jobs at the same time. Or are they set up to start at different minutes? For example, the 2 minute cron set at 0 minutes then run at  0,2,4,6,8,10,ect, the 5 minute cron set to start at one minute after the hour then run at 1,6,11,16,21 ect. The 10 minute set at 3 minutes after the hour which then would run at 3,13,23,33 ect......

Doug

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Cron Job sites
« Reply #10 on: April 04, 2016, 11:25:17 PM »
They are set at different interval to try to avoid the-same-time-execution as much as possible but there are time duplications eventually.  The actual cron job is run near the interval set but do fluctuate more or less.  I have just figured out that the user-defined option can have it set for any minute (every day, every hour) so will give that a try.  Not sure though if that is how the job will be run.  Thanks for mentioning.

Paul

Offline Mapantz

  • Forecaster
  • *****
  • Posts: 781
    • Wareham Weather
Re: Cron Job sites
« Reply #11 on: April 19, 2016, 10:28:46 AM »
Well, after moving to a new host, I spotted that my cronjobs were being changed overnight. The main three I have, are two at 5 minute intervals, and one at a 1 minute interval, they were changing to 15 minutes at midnight- server time. The hosting company said that is the maximum they allow.
In the end, I bit the bullet and set up an account with setcronjob.com - $10 a year to allow 3,600 daily executions of cronjobs, and allowing cronjobs to be run as low as 30 second intervals.
I don't particularly like paying extra, but $10 a year isn't too bad for what I need. :)


Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5519
    • KomokaWeather
Re: Cron Job sites
« Reply #12 on: April 19, 2016, 12:23:36 PM »
Thanks for that.  I may look at something different as well but over the past 10 days or so Cron-Job.org has been very good with several days of no failures and other times one or 2 failures a day at most.  I will make note of setcronjob.com in the event mine goes to a lot of failures again.

Enjoy,
Paul