News for hackers. Stuff that matters.
Re:Ask HN: What API do you wish you had while building your ... by andrewfong on Sunday July 09, 2017 @05:02PM (#14731645)
Let me programmatically schedule a task to run at a specific time, just once. E.g. if my user tells me to remind them about something in a day, I want to schedule a task to do that exactly 24 hours from now.

I'm sure this exists already but it's hard to find because searching usually points me to a cronjob service. But what I'm looking for is distinct from a that. I don't want to run something every minute or hour or checking if there's any work to do. I just want a given task to run as a pre-determined time, scaled to any arbitrary number of tasks.

Re:Ask HN: What API do you wish you had while building your ... by rocqua on Sunday July 09, 2017 @05:05PM (#14731655)
The cron alternative that does something only once is 'at'.
Re:Ask HN: What API do you wish you had while building your ... by Ao7bei3s on Sunday July 09, 2017 @05:25PM (#14731752)
The modern at alternative is:

systemd-run --user --on-calendar=23:20 notify-send Example

Or relative with --on-active=60. And you automatically get the normal systemd tooling, e.g. systemctl list-timers.

Re:Ask HN: What API do you wish you had while building your ... by merb on Sunday July 09, 2017 @05:53PM (#14731902)
well this works fine for a single host. but if you deal with a cluster or inside a cloud you better use kubernetes for that.
Re:Ask HN: What API do you wish you had while building your ... by megamindbrian on Sunday July 09, 2017 @05:42PM (#14731846)
I am building a set of Nodejs ipy notebooks to do this kind of stuff: https://github.com/megamindbrian/jupytangular

Eventually I want to wrap it in an Angular interface.

Re:Ask HN: What API do you wish you had while building your ... by 12s12m on Tuesday July 11, 2017 @07:13AM (#14743144)
What exactly do you mean by a "task". Just remind you by sending you an email? or actually running a command on your computer?
Re:Ask HN: What API do you wish you had while building your ... by danenania on Monday July 10, 2017 @02:28PM (#14738436)
I think Zapier and other similar services can do this sort of thing?
Re:Ask HN: What API do you wish you had while building your ... by bkovacev on Sunday July 09, 2017 @05:18PM (#14731714)
Celery?
Re:Ask HN: What API do you wish you had while building your ... by Phenomabomb on Sunday July 09, 2017 @05:56PM (#14731925)
I've heard good things about Autohotkey, but every time I try to do even the simplest of tasks it becomes a hassle. Like even just clicking on a specific point on your screen you have to know the exact coordinates of the place you want clicked. It seems like it'd be very easy just to record where you want to click.
Re:Ask HN: What API do you wish you had while building your ... by tahw on Monday July 10, 2017 @05:31PM (#14739882)
When I'm working on tasks like that I like to add a hotkey that just puts the mouse's location on a tooltip for me. Sometimes you can just Tab to whatever you're trying to click, too, which is robust to window position.