crontab-ui
crontab-ui copied to clipboard
Crontab-UI works only manually
Jobs works only if ran manually.
Also no log is written even when ran manully
Any workaround to fix this issue ?
If you run crontab-ui using CentOS, you need to change CRON_PATH to /var/spool/cron It is working for me, and don't forget to press green "Save to crontab" button.
export CRON_PATH=/var/spool/cron
@Co7omo What do you mean by "If ran manually" ?
@rwibowo Thanks for the info!
same here. script only run if I press 'run' manually in the console
Hi,
I've got similar problem, I can add/edit/delete jobs from the interface, however, as shown in the image attached, my job is always with 'RUN' button looks like the script is not started at all. I can run it manually by pressing the 'RUN' button, the jobs is executed, but not automatically.
I've started crontab-ui.js
with pm2
as suggested in the documentation to have it as a service and it look like is running ok without error(s) (see below)
Last but not least, there is not log(s) created under crontab-ui/crontabs/logs
directory. Even if the enable logging
checkbox is checked.
Any clue over these issues? I really like your tool, its great help for our people.
Thanks in advance
I was experiencing this issue as well, in my case, I was trying to curl a command. Turns out with cron you must in some cases specify the full path to your binary (e.g. "/usr/bin/curl" instead of "curl"). You can also set up the PATH variable in the crontab-ui interface. Also, there are disallowed chars in cron such as "%" which will render as newline. I was seeing this since my curled url contained HTML escaping. You will need to escape them in the crontab file (ex. "\%" )
@Co7omo Hey.
you can run it deamon with pm2
(sudo npm install pm2 -g). At command run env HOST=0.0.0.0 pm2 start crontab-ui -- --autosave
. It work for me.
I am experiencing this issue to date.
node version: 12.13.0 npm version: 6.12.0
I am able to create jobs and click run to fire the job no problem; however, a ping to google scheduled for every minute never gets ran.
The first issue I come across in this process is attempting to use pm2 command pm2 start crontab-ui
pm2 error log for this command is as follows:
Secondly, I may click the run button to get a ping to google when running the UI without pm2. At each minute with my cron statement I expect a ping every minutes but it seems to be doing nothing.
Here I expect to print out by 11:34 and nothing occurred:
Any potential update with this issue/how to get it working for demonstration purposes.
@GregoryVillareal Did you click save to crontab
?
@alseambusher Yes, saving to crontab results in this error:
I've tried to find the log file; though it isn't shown in this directory:
@GregoryVillareal are you using windows? This works only on linux/unix and mac like OSes.
For me it was because I forgot to save to crontab :( Not very intuitive! Why can't this be done when ever one edits a job?
@caco3 you can use the --autosave option if you don't want to click on 'save to crontab'.
I made it optional because if this was default and you make some mistake while adding a job, it would mess up all other running jobs. This would be bad in a production environment.
@alseambusher Can you add a marker in the ui for each unsaved but edited cronjob. That helps one to realise that it isn't saved. It took me some time to figure out what was wrong, and that I have to press "Save to Crontab" every time.
@alseambusher Yes, saving to crontab results in this error:
I've tried to find the log file; though it isn't shown in this directory:
I hade same problem, what solved it was to set "HOME=/home/cronjob" in environment variable i use systemd to run this and have following in the file "/etc/systemd/system/crontab-ui.service"
[Unit] Description=Crontab-ui Server After=network.target syslog.target
[Service] Type=simple ExecStart=/home/cronjob/node/bin/node /home/cronjob/node_modules/crontab-ui/bin/crontab-ui WorkingDirectory=/home/cronjob/ Restart=always # If set to always, the service will be restarted regardless of whether it exited cleanly or no$ RestartSec=10 # Restart service after 10 seconds if node service crashes StandardOutput=syslog # Output to syslog StandardError=syslog # Output to syslog SyslogIdentifier=Crontab-UI User=cronjob Group=cronjob Environment=HOST=cron02.dc01 Environment=PORT=8000 Environment=BASIC_AUTH_USER=**** Environment=BASIC_AUTH_PWD=**** Environment=HOME=/home/cronjob
[Install] WantedBy=multi-user.target
Hello, I have exactly the same, I tried every solution and still the same, this is my command: cd /home/user/Documents/testservice && /usr/bin/dotnet test --filter FullyQualifiedName~Tests.SeleniumTests.Tests.AuthenticationTest.AuthenticationDesktop Tests/Tests.csproj
If I click on Run it works but not automaticly, I set to run this command every 2 minutes something wrong with my command? Only with the root right you can use this command but crontab-ui is open with the root right also Someone can help me?
@HMS-WebHub you can find the log in the browser console.
I'm having the same problem.
Hi, I have encountered this issue, and was able to fix it by doing the following steps.
I'm using a MAC but I think the fix is similar to other platform as well.
- Ensure that you are saving to crontab.
- When you first tried to run
crontab-ui
and you get a permission error, do not just run the command usingsudo
instead, change the permission ofcrontab-ui/crontabs
e.g.sudo chmod 777 /usr/local/lib/node_modules/crontab-ui/crontabs
- Change the permission of the directory where your crontab file is saved, in a mac that is
sudo chmod 777 /tmp/crontab
Just try to read the logs when you run crontab-ui
as that is extremely useful.
I will try this in a Ubuntu and RHEL VM over the weekend, and will get back here to update this comment.
I hope it helps someone in the future.
And even more pain if you install it in docker container: /bin/sh: apt-get: not found, sh not found, sudo not found...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@GregoryVillareal Did you click
save to crontab
?
You need to explicitly click on save to crontab
in case you make any change to any listed cron. so Ideally all the listed tabs should also be present in Environment Variables tab...Attaching Screenshot
So finally it worked for me as well, I am using Windows 10