How much monthly hours does the Scheduler addon take on Heroku? - ruby

In the Heroku documentation it's said that addons, such as Scheduler, add up to your montly hours, meaning you would have to pay if it adds up more than 30 hours (I have only one web dyno, so I'm using 720 montly hours, and the maximum free is 750 hours). So, how to calculate how much Scheduler takes from your montly hours? For example, if I have a daily task, how much would it take from my montly hours?

It means the wall clock time of the time taken for the jobs that are executed by scheduler to run.
So, for instance, if you're running a 1 minute job every hour, you'd be looking at 720 minutes of time every 30 days.

I believe this last answer is incorrect - the scheduler costs the same hourly as a regular dyno - right?

Related

Heroku pricing dyno confusion

I'd like to buy a "Hobby" package on Heroku but I'm confused by the pricing. It says $7 per Dyno per month, but then it also says you pay for the fraction of actual processing time. So if I have a thousand 100ms requests a day thats just 50 minutes a month. So do I pay 7/(30*24*60)*50 dollars for that total?
What if I dont have a single request for a month at all? Do I still need to pay?
thank you
Edit: I meant minutes, even less then
If your dyno runs 24*7 the whole month you have to pay 7$.
If your dyno runs just one day in a month you pay 7/30 $.
This is what "fraction of actual processing time" means.
So the Hobby Dyno won't cost more then 7$.

Is there a way to schedule job on heroku every 5 hours (or period that doesn't sum up to 24 hours)?

I know there is a free scheduler add-on in Heroku. The problem is that it only provides daily, hourly and every 10 mins. If it is every 4 hours, I can set 6 daily tasks. However, if I want a period that doesn't sum up to 24 hours, for example, 5 hours, seems there is no obvious option on the UI. Is there a way I can set the scheduler to start a job every 5 hours?

JavaScript/html time

I'm trying to convert the normal 24 hour system to a 20 hour system in JavaScript or html
there seems to be problems and I don't know how to fix them, the program code as a whole works ok but it's not accurate in the area of displaying the proper time
can someone help me.
24hrs per day to 20hrs
60 minutes per hour to 40 minutes per hour
60 seconds per minute to 80 seconds per minute
1000 milliseconds per second to 1350 milliseconds per second
I have been working with the code that is supposed to get the milliseconds from 1/1/1970 to make things hopefully simple but like I said the program isn't working quite right, I do have a table that lets me know what normal time would be at each changed hour but that's all the info I have
Check this Fiddle:
http://jsfiddle.net/z4s7j9vL/1/
My approach was to get the timestamp difference between the current time and midnight of the same day:
millis = ts - clone.getTime();
This way you get how many milliseconds have passed this day and you can do your conversion from there. This is limited to converting time only, but if months and years followed the same principles you could just convert the same way from the current timestamp.

How much does Heroku Scheduler cost in dynos?

I understand it's a one-off dyno, but i don't get how it works. Does the scheduler take one dyno everytime it needs to schedule.
I need a background job to run once every 24 hours, so i will require the scheduler, how much would this cost? So would it be (750 +30) dyno hours?
It's charged based on how long it runs for at $0.05 per hour prorated to the second. So if it runs 30 times a month and takes a minute to run each time you will be charged $0.0025 - ie total run time 30 minutes a month

What's the minimum time counted for billing in Heroku?

Ec2 instance hour calculated by hour by hour. If you just start and close an instance, it still counted as one hour.
How Heroku handle this? By Minute or By Hour?
Lets assume my app usage exceeds 750 Free Dyno Hour Limit
Heroku prorata to the second. A dyno costs $0.05 per hour. So if you go over 750 hours you will be charged at $0.05 per hour or $0.000833333 per minute. In fact, pretty much all addons also follow the same billing model too.
You can read about billing and charges as https://devcenter.heroku.com/articles/usage-and-billing#cost
I will say, though, that the previous answer seems to be more accurate for the web dyno versus a worker dyno. Heroku's automated sleep cycle for your web dyno tries to prevent it from running too long when it's idle, say, for more than an hour. For the free web dyno it must sleep at least six hours per day for it not to incur charges. As long as you set the scaling to 1 for your web dyno and it sleeps then it should be free.
That said, when you add your first worker dyno those same automations aren't applied to this dyno. It presumably won't be triggered to sleep on idling for an hour. This means that unless you manage it you'll likely be charged $34.50 for each worker dyno per month. I wouldn't exactly call this lying to the customer but most people start off with that first free dyno, get comfortable with that and then innocently think that the next dyno will behave in a similar way--it won't and you'll likely get tagged paying more money than you'd bargained for. That's $414-per-year for a dyno. Compare this with Amazon's t2.micro cost of $150-per-year for one instance or $75-per-year for a 50% duty cycle of same.
As they say, "the devil is in the details". Heroku might be cheap for vanity websites but it's a bit costly if you have a database and worker thread (without any scaling otherwise whatsoever).

Resources