mifi / mifi/SimpleInstaBot

If Mac sleeps, bot doesn't start the next day

Open
#91 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
692
Forks
103
Avg merge
3m
Merged PRs (30d)
4

Description

The Insta bot goes to sleep till the morning. And it says: “sleeping 19 hours, waiting until 8 am”
Das problem is: of coz my Mac goes to sleep as well (and wakes up before or around 8 am).
But the instabot doesn’t run anymore because it seems like the waiting Timer stops counting when the Mac sleeps.
Could you do an implementation that the instabot checks the time?
And goes to sleep till 8 am, so it will continue after 8 am?

This should be this line:
https://github.com/mifi/SimpleInstaBot/blob/ad5436c1aba034005d15484835adcce9263dff88/public/electron.js#L178

Maybe we could instead implement a setInterval loop that checks current time every minute or so.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at public/electron.js line 178 and inspect the current sleep-until-8-am behavior. Confirm the change by checking that the bot resumes after the Mac sleeps and wakes past 8 am, without relying on the timer continuing during sleep.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.