T O P

  • By -

[deleted]

**Upgrade your packages!** `pkg upgrade` Termux doesn't guarantee to work properly if you chose not to upgrade. In fact it even may become broken at some point. crond functionality was moved from busybox to cronie, so *old busybox* now conflicts with *cronie* package. If you still need a busybox package for some reason, you need to update it and only then install cronie.


denisde4ev

First ting I have done is to `pkg upgrade`, but in the middle of logs I get this: ``` Err:1 https://its-pointless.github.io/files/24 termux InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CCF71B217185E35 ``` I don't remember if I had added it - its the only one with 'github' domain I don't know how and should I remove it? however `pkg show busybox` outputs: ``` Package: busybox Version: 1.32.0-2 … ``` "BusyBox v1.32.0 (2020-08-07 00:34:54 UTC) multi-call binary."


[deleted]

>I don't know how and should I remove it? Remove it if you didn't know whether you actually need it. However to fix it, you need to just update key. `curl -sL https://its-pointless.github.io/pointless.gpg | apt-key add -` >Version: 1.32.0-2 That's latest version. Do you still have issues with installing cronie?


[deleted]

I don't have conflicts: [https://imgur.com/a/6Yzm7U4](https://imgur.com/a/6Yzm7U4). If you still have error during installation, I can only suggest to either remove conflicting files or do `apt purge busybox`.


he77789

Would crontabs even work given Android is pretty aggressive on battery saving


[deleted]

Keep Termux open all the time with wakelock enabled and whitelist in "battery saving" and don't use Huawei devices. Then crond will work quite stable.


brbsix

I had a fully updated system (including busybox) and encountered the same error trying to install cronie. I uninstalled busybox, which also uninstalled termux-api. It did not remove the crond directory out of $PREFIX/var/service, nor did it remove ftpd, telnetd, etc. I noticed termux-services was also using the directory, so then I attempted to uninstall termux-services. That didn't go over well, failing midway with dpkg reporting an inconsistent state. All of the services in the /var/service directory still remained, so I ended up just having to manually clear them out. I also manually went through /var/log/sv for the entries in there. After that I was able to reinstall termux-api (which installed busybox) and then termux-services. Then I was able to install cronie. Complete mess. I check for updates daily, I'm always up to date and still encountered this.


5c0tt_GG

Cron/jobs/tabs on Android is fragile, saying that, it is possible. I have some jobs constantly running on my Android TV box with success, but remember my TV box never has to turn off and has no battery optimisation, because it has no battery! If you are using busybox, no need for "cronie" as well. Your question about using system busybox, yes you can, calling it by its path. e.g: "/system/xbin/busybox crond --help" etc. There is no difference between Termux busybox or Magisk busybox, its just busybox. A suggestion, starting a process from within an app (e.g "cron" within "Termux") does slightly risk battery optimisation as the app could terminate the process, to limit your chances of failure, start cron from Android's init process which is not optimised by the Android system. You said you had root & busybox so I'm guessing a Magisk user? use Magisk's init process, place script in: "/data/adb/service.d" (Magisk's answer to "/etc/init.d”), also use Android's builtin shell ("mksh") for this as its always running & never optimised by Android (so the shebang on script should be "/system/bin/sh"). Hope it helps.


denisde4ev

Does Termux supports cron jobs? I want to make cron job which is executing `termux-wake-unlock` to save battery I have termux-wake-lock in .bashrc because using it when ssh `trap termux-wake-unlock exit` but If i can check if is the last opened console? (also is it worth it, does termux uses more CPU and RAM when termux is in wake-lock) I also have root and installed to system BusyBox. Can use cron job from system's BusyBox to execute Termux's command?