[GH-ISSUE #147] Cannot auto-run with cron #115

Closed
opened 2026-03-02 23:38:07 +03:00 by kerem · 3 comments
Owner

Originally created by @sepi2048 on GitHub (Oct 20, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/147

Hi,
I made this simple bash script (run-insta.sh) that should run insomniac every 8 hour:

#!/bin/sh
    
/usr/bin/python3 /home/me/Insomniac/insomniac.py --interact <user1> <user2> <user3> --total-likes-limit 150 --follow-percentage 10

In sudo crontab -e:

0 */8 * * * /bin/bash /home/me/Insomniac/run-insta.sh

The bash script seem to be fired every 8 hour, but not run properly. This is my cron log output

[10/20 18:07:02] Connected devices via adb: 1. That's ok.
[10/20 18:07:02] Instagram version: not found
[10/20 18:07:02] Using uiautomator v2
[10/20 18:07:02] Please install uiautomator2: pip3 install uiautomator2

Have anyone made insomanic to run by the help of cron or in any other way?

P.S. This run-insta.sh bash script runs flawless when executed manualy

Originally created by @sepi2048 on GitHub (Oct 20, 2020). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/147 Hi, I made this simple bash script (run-insta.sh) that should run insomniac every 8 hour: ``` #!/bin/sh /usr/bin/python3 /home/me/Insomniac/insomniac.py --interact <user1> <user2> <user3> --total-likes-limit 150 --follow-percentage 10 ``` In sudo crontab -e: `0 */8 * * * /bin/bash /home/me/Insomniac/run-insta.sh ` The bash script seem to be fired every 8 hour, but not run properly. This is my cron log output ``` [10/20 18:07:02] Connected devices via adb: 1. That's ok. [10/20 18:07:02] Instagram version: not found [10/20 18:07:02] Using uiautomator v2 [10/20 18:07:02] Please install uiautomator2: pip3 install uiautomator2 ``` Have anyone made insomanic to run by the help of cron or in any other way? P.S. This run-insta.sh bash script runs flawless when executed manualy
kerem closed this issue 2026-03-02 23:38:07 +03:00
Author
Owner

@darmawan07 commented on GitHub (Oct 21, 2020):

Try with this.

#!/bin/bash

python3 /home/me/Insomniac/insomniac.py --interact --total-likes-limit 150 --follow-percentage 10

<!-- gh-comment-id:713366471 --> @darmawan07 commented on GitHub (Oct 21, 2020): Try with this. #!/bin/bash python3 /home/me/Insomniac/insomniac.py --interact <user1> <user2> <user3> --total-likes-limit 150 --follow-percentage 10
Author
Owner

@Foncekar commented on GitHub (Oct 22, 2020):

Just run this pip3 install uiautomator2

<!-- gh-comment-id:714318751 --> @Foncekar commented on GitHub (Oct 22, 2020): Just run this `pip3 install uiautomator2`
Author
Owner

@sepi2048 commented on GitHub (Oct 23, 2020):

Just run this pip3 install uiautomator2

I obviously has uiautomator2 installed if the bash script run successfully when executed manually. There seems to be a path issue related to uiautomator2 when it tries to run through cron.

<!-- gh-comment-id:715534244 --> @sepi2048 commented on GitHub (Oct 23, 2020): > Just run this `pip3 install uiautomator2` I obviously has `uiautomator2` installed if the bash script run successfully when executed manually. There seems to be a path issue related to `uiautomator2` when it tries to run through cron.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#115
No description provided.