question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dockerized crontab-ui jobs will not run without trick

See original GitHub issue

Before all thank you for your amazing project!

I’m using this cool tool on docker. My docker-compose.yml is shown below:

version: '3.7'

services:
  crontab-ui:
    container_name: crontab-ui
    build: .
    image: alseambusher/crontab-ui
    network_mode: bridge
    ports:
      - 3030:8000
    env_file: variables.env
    volumes:
      # - /var/spool/cron/crontabs/my_username_here:/etc/crontabs/root
      - /etc/cron.d:/etc/crontabs
      - ./data/crontabs:/crontab-ui/crontabs

As you already know **If we are decided to add a cronjob to cron.d, we have to mention the username, after time configuration. So, this will work for crontab -e:

* * * * * wall Hello from crontabs $(date)

But it will definitely not work in cron.d and it should be:

* * * * * wall my_username_here Hello from cron.d $(date)

As you can see in the image below, I used the last time text box to define my username! Can we add an input for that? (I’ll be honored to volunteer this task, if you let me know your idea about it.)

image

Cheers

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
icemtelcommented, Oct 11, 2022

Unrelated to your issue, but you probably understand this better than I do:

  • Does crontab-ui installed with docker work properly (meaning that it can read and write to the real crontab file and see execution log) only if the crontabs folder is mounted?
  • Does it update the crontab file only if “save to crontab” is pressed?
0reactions
tayyebicommented, Nov 11, 2022

Does it update the crontab file only if “save to crontab” is pressed?

Short answer: YES.

As I wanted to use this container to configure cronjobs on my host machine, I linked /etc/cron.d:/etc/crontabs in my docker-compose.yml.

If I want to summarize, it will be so nice, if we could have another field, right after cron expression (and before ((({), for username.

Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · alseambusher/crontab-ui - GitHub
Contribute to alseambusher/crontab-ui development by creating an account on GitHub. ... dockerized crontab-ui jobs will not run without trick.
Read more >
Running cron python jobs within docker - Stack Overflow
Cron doesn't start automatically. You can run it from a Dockerfile using RUN or CMD or add it to a startup script for...
Read more >
alseambusher/crontab-ui - Docker Image
If you want to run the same jobs on multiple machines simply export from one instance and import the same on the other....
Read more >
What is the cheapest, easiest way to host a cronjob in 2022?
I mean, you don't have to dockerize it, and I would use S3 or Dynamo for state, but otherwise it's a pretty simple...
Read more >
Running GUI Applications on Docker in Linux - GeeksforGeeks
Let's say you are trying to build a UI application and deploying it as a Docker Container. If you want that UI application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found