Cr*nmaster 1.5.0 - Major update
from fccview@lemmy.world to selfhosted@lemmy.world on 13 Nov 16:30
https://lemmy.world/post/38747953

Hi,
A small chunk of you of you may know me for my app Jotty, however I also published a slightly less popular (entirely open source) app called Cr*nmaster.

repo: https://github.com/fccview/cronmaster

Cr*nmaster (cronmaster) is a pretty powerful tool that allows you to view/create/edit/manage all your host cronjobs comfortable from an intuitive UI, it has features such as pausing jobs, adding comment to them, running them right from the UI, and from the latest update you’ll be able to have nicely structured logs for your jobs on top of exit statuses being shown right there and then. You will be able to see if a job failed at a glance and view the logs to see what’s going on.

I have also added translations that can be customised locally on your own machine (or you can be an angel and create a pull request with your own language so we can officially support it, together!)

The whole thing is very easy and straightforward to setup both with and without docker, the repository has a lot of guides in the `howto` folder on top of a very verbose readme file.

Here’s a few of the key features:

All this to say that I am extremely excited for everything that’s coming with this latest update, you can read about the latest release and all the improvements that came with it here

Let me know your thoughts and if you run in any issues i’m fairly active on github and on my discord server :)

NOTE for docker users:
Due to this needing to be able to read crontabs the docker has to run as root and have read/write access to your cron jobs. There was no way around it, so I suggest you keep this within your home network and not exposed to the web for security reasons.

#selfhosted

threaded - newest

irmadlad@lemmy.world on 13 Nov 17:20 next collapse

First, thank you so much for including screenshots on your github. I am a visual kind of guy, and knowing what the WUI looks like really helps sell the app. I am immeasurably disappointed when devs do not include, at the very least, a screen shot of the WUI. Then I have to do a image search, and sometimes there just aren’t any. It just seems like a menial task to snap a few shots and upload them. But then again, I’m not a published dev. Just my two cents.

Anyways, I have this on my dashboard. I am sure I have something misconfiguration or something missing permissions. To do a quick test run:

spoiler

- Create your first task - User is root - Schedule: 0 6 * * * - I’m using ‘Check Disk Space’: bash /volume1/docker/cronmaster/scripts/check-disk-space.sh # Check disk space # Alert if disk usage is above 90% DISK_USAGE=$(df -h / | tail -1 | awk ‘{print $5}’ | sed ‘s/%//’) if [ $DISK_USAGE -gt 90 ]; then echo “Disk usage is ${DISK_USAGE}%” | mail -s “Disk Space Alert” admin@example.com fi - Gave it a description: Check Disk Space - Click ‘Create Task’ - Receive error: ‘Failed to create cron job’

I am using the provided docker compose. Full Docker logs are full of errors. LOL:

spoiler

at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:524:28) at maybeClose (node:internal/child_process:1104:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { 
code: 127, killed: false, signal: null, cmd: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -”, stdout: ‘’, stderr: ‘sh: 1: crontab: not found\n’ } Error writing host crontab for user root: Error: Command failed: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -” sh: 1: crontab: not found at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:524:28) at maybeClose (node:internal/child_process:1104:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { 
code: 127, killed: false, signal: null, cmd: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -”, stdout: ‘’, stderr: ‘sh: 1: crontab: not found\n’ } Error executing host crontab command: Error: Command failed: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -” sh: 1: crontab: not found at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:524:28) at maybeClose (node:internal/child_process:1104:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { 
code: 127, killed: false, signal: null, cmd: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -”, stdout: ‘’, stderr: ‘sh: 1: crontab: not found\n’ } Error writing host crontab for user root: Error: Command failed: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -” sh: 1: crontab: not found at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:524:28) at maybeClose (node:internal/child_process:1104:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { 
code: 127, killed: false, signal: null, cmd: nsenter -t 1 -m -u -i -n -p sh -c “echo ‘MCA2ICogKiAqIC92b2x1bWUxL2RvY2tlci9jcm9ubWFzdGVyL3NjcmlwdHMvY2hlY2stZGlzay1zcGFjZS5zaAo=’ | base64 -d | crontab -u root -”, stdout: ‘’, stderr: ‘sh: 1: crontab: not found\n’ } Error executing host crontab command: Error: Command failed

fccview@lemmy.world on 13 Nov 19:21 collapse

Hi, I went through your logs and it seems like crontab is not installed on the host machine?

stderr: 'sh: 1: crontab: not found'

The tool uses the host crontab command via nsenter to manage cronjobs, so it only works if ran from hosts that leverage crontab to run cron jobs.

If that’s not the issue let me know and we can try and debug it together further, but looking at the logs it really seems like crontab is just not installed on your nas (guessing it’s a nas looking at the volume1 path)

p.s.

Thank you for the screenshots acknowledgment, I absolutely hate not having a visual aid on repositories when I want to try a new tool, I like to see what I am getting into before I get into it, and I absolutely judge a book by its cover, I am a frontend tech lead, UI is extremely important to me, if an app doesn’t have a somewhat clean UI I kinda refuse to even try using it hahah

irmadlad@lemmy.world on 13 Nov 20:06 collapse

crontab

Hmmmm…

systemctl status cron

● cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2025-11-12 17:09:55 UTC; 1 day 2h ago
       Docs: man:cron(8)
   Main PID: 996 (cron)
      Tasks: 1 (limit: 47901)
     Memory: 358.5M
        CPU: 59.110s
     CGroup: /system.slice/cron.service
             └─996 /usr/sbin/cron -f -P

I’ll dick around with it some more. I don’t want to hammer you right in the middle of your promo.

fccview@lemmy.world on 13 Nov 20:20 collapse

Meh, I want to make sure things work, that’s also part of the promo right? haha

run which crontab for me? I can see cron is running but I still am not sure you have crontab installed on the host machine if that makes sense

irmadlad@lemmy.world on 13 Nov 20:36 collapse

which crontab

Should’ve included that. My bad.

~# which crontab

/usr/bin/crontab

if that makes sense

I’m always down to learn from those more knowledgeable than I.

fccview@lemmy.world on 13 Nov 20:59 collapse

Oh wow, that definitely threw me off lol anyhow, I don’t think I am more knowledgeable than you at all, I just know the tool I built more, so I can help figure out the nuances of it…

I have a feeling nsenter is not liking your nas for some reason, I wanna try a workaround and if it works for you I’ll go through the code and sort it out so we can use a proper env variable for this

add this env variable for now and tell me if it sorts you out <3

environment:
  - PATH=/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:$PATH
Lukstru@fedia.io on 13 Nov 17:59 collapse

This would be awesome if it somehow integrated into proxmox and I could view my crontabs of all LXCs and VMs from one interface.
Preferably while running as its own LXC, but I’m flexible on that :P
Nice project :)

Also, does it support multiple users? Crontab -e is available for each user, and they get saved to multiple locations, right?

fccview@lemmy.world on 13 Nov 18:23 collapse

Hi, haven’t tried to run it with proxmox as I never managed to get into it, but yes, it does support multiple users (there’s an env variable for that) and you can filter them easily via the UI ♥️