surely just a minor issue.
when editing a user specific crontab with
crontab -e
a file is created (u0_a88 in this sample):
/data/data/com.termux/files/usr/var/spool/cron/crontabs/u0_a88
but with zero size always. This probably is because sendfile() returns an error (Invalid argument):
strace -f -o strace.out crontab -e
strace.out:
26159 openat(AT_FDCWD, "u0_a88.new", O_WRONLY|O_CREAT|O_TRUNC|O_APPEND|O_LARGEFILE, 0600) = 4
26159 sendfile(4, 3, NULL, 16777216) = -1 EINVAL (Invalid argument)
26159 read(3, "", 4096) = 0
26159 close(4) = 0
editing
/data/data/com.termux/files/usr/var/spool/cron/crontabs/u0_a88
directly instead works with no problems. I.e.
crontab -l
returns the correct result and the cron jobs are executed as expected by 'crond'
This seems to be fixed now, perhaps by a busybox update?
@sp4rkie If you (or anyone else) is still having this problem (after checking that the VISUAL and EDITOR environment variables aren't specifying anything non-existant), let me know and I'll reopen the issue!
thanks for picking up this minor issue:-)
I've just tested it. Sorry, for me it appears with busybox 1.26.2-3 it still does not work. What I did:
$ apt update && apt upgrade
$ echo $VISUAL $EDITOR
vi vi
$ crontab -e
this calls vi and I create some content e.g.:
* * * * * date >> /data/data/com.termux/files/home/test.log
the temporary filename for this is e.g.
/data/data/com.termux/files/usr/var/spool/cron/crontabs.23841
after exiting the editor with 'ZZ' it tells me
"/data/data/com.termux/files/usr/var/spool/cron/crontabs.23841" 1L, 60C written
everything appears to be ok so far. This by the way creates 2 new files (cron.update,u0_a03):
$ ls -l /data/data/com.termux/files/usr/var/spool/cron/crontabs
total 8
-rw------- 1 u0_a03 u0_a03 44 Apr 15 06:58 README.termux
-rw------- 1 u0_a03 u0_a03 14 Apr 18 07:36 cron.update
-rw------- 1 u0_a03 u0_a03 0 Apr 18 07:36 u0_a03
for some reason file u0_a03 is still zero sized. The transferal from crontabs.23841 to u0_a03 obviously does not work. Normally in u0_a03 should reside what I just edited above...
Workaround is just to go down to /crontabs and add a file with user ID as name.
that's exactly what I already mentioned in the first post of this thread
This seems to be fixed now, perhaps by a busybox update?
@sp4rkie If you (or anyone else) is still having this problem (after checking that the
VISUALandEDITORenvironment variables aren't specifying anything non-existant), let me know and I'll reopen the issue!
Hi today I installed busybox and I tried to run crontab -e. I am getting this error:
$ crontab -e
The program crontab is not installed. Install it by executing:
pkg install cronie
I also tried to print $VISUAL $EDITOR variables using
echo $VISUAL $EDITOR
which return nothing or an empty line break.
My device is Samsung M30.
My termux-info:
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# root-repo (sources.list.d/root.list)
deb https://dl.bintray.com/grimler/termux-root-packages-24 root stable
Updatable packages:
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.4.177-18663293 #1 SMP PREEMPT Fri Jun 12 13:39:38 KST 2020 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-M305F
This seems to be fixed now, perhaps by a busybox update?
@sp4rkie If you (or anyone else) is still having this problem (after checking that theVISUALandEDITORenvironment variables aren't specifying anything non-existant), let me know and I'll reopen the issue!Hi today I installed busybox and I tried to run crontab -e. I am getting this error:
$ crontab -e The program crontab is not installed. Install it by executing: pkg install cronieI also tried to print $VISUAL $EDITOR variables using
echo $VISUAL $EDITORwhich return nothing or an empty line break.
My device is Samsung M30.
My termux-info:
Packages CPU architecture: aarch64 Subscribed repositories: # sources.list deb https://termux.org/packages/ stable main # science-repo (sources.list.d/science.list) deb https://dl.bintray.com/grimler/science-packages-24 science stable # game-repo (sources.list.d/game.list) deb https://dl.bintray.com/grimler/game-packages-24 games stable # root-repo (sources.list.d/root.list) deb https://dl.bintray.com/grimler/termux-root-packages-24 root stable Updatable packages: All packages up to date Android version: 10 Kernel build information: Linux localhost 4.4.177-18663293 #1 SMP PREEMPT Fri Jun 12 13:39:38 KST 2020 aarch64 Android Device manufacturer: samsung Device model: SM-M305F
Okay I used
busybox crontab -l
and all things seem working fine.
Thanks
Also I need to install vim to use
busybox corntab -e.
pkg install vim