Quantcast
Channel: Why crontab scripts are not working? - Ask Ubuntu
Browsing all 48 articles
Browse latest View live

Answer by Pawel Cioch for Why crontab scripts are not working?

Crontab PermissionsThere are two files that control the permissions for crontab: /etc/cron.allow and /etc/cron.deny. If there is a cron.allow file, then the user or users that need to use cron will...

View Article



Answer by GrayedFox for Why crontab scripts are not working?

The default .bashrc files on UBuntu 16.04 (and many other versions) have a built in mechanism to not do anything if they are not an interactive shell.This can prevent the file from being sourced...

View Article

Answer by loxaxs for Why crontab scripts are not working?

You used:* * * * * DISPLAY=:0 /path/to/your/appbut it failed because your ~/.dbus directory is owned not by you but by root. Check it:ls -l ~/.dbus

View Article

Answer by AlonL for Why crontab scripts are not working?

Another caveat: Try not to put your cron scripts in a user's home directory.I just had a problem where everything seemed good, but just after a while - probably a few hours after I log out, the cron...

View Article

Answer by Dennis Parslow for Why crontab scripts are not working?

On my RHEL7 servers, root cron jobs would run, but user jobs would not. I found that without a home directory, the jobs won't run (but you will see good errors in /var/log/cron). When I created the...

View Article


Answer by Kulasangar for Why crontab scripts are not working?

After hours found out the problem where, I was editing the shell script from Windows (notepad++), where the file was originally located in a Linux server and I've missed out the new line...

View Article

Answer by Henrik N for Why crontab scripts are not working?

Cron jobs won't run if your user's password has expired.One indication of this is if your cron log (typically /var/log/syslog on Ubuntu, I believe) contains messages like "Authentication token is no...

View Article

Answer by Christopher Gonzalez Gonzalez for Why crontab scripts are not working?

In 16.04, if you have this error in syslog(CRON) error (can't fork)try:systemctl status cron.serviceIn the result:Tasks: num_task (limit: 512)If num_task is close to the limit use:systemctl...

View Article


Answer by sxc731 for Why crontab scripts are not working?

Sometimes cron is working just fine but the script or command you want it to run just fails silently, causing you to bark up the wrong tree.In such cases I find it useful to wrap the target within...

View Article


Answer by Paul for Why crontab scripts are not working?

My crontab only worked when I was logged in as user.I found the solution suggested here on Unix & Linux SEWhat was the problem is that the scrips were in my home directory which was encrypted. So...

View Article

Answer by KiloOne for Why crontab scripts are not working?

In my case cron and crontab had different owners.NOT working I had this:User@Uva ~ $ ps -ef | grep cron | grep -v grepUser 2940 7284 pty1 19:58:41 /usr/bin/crontabSYSTEM 11292 636 ? 22:14:15...

View Article

Answer by marius-nyxpoint for Why crontab scripts are not working?

I had some issues with using sudo in a cron. Basically I wanted to run a command as a specific user and I tested first, at the command line, su, which returned the error This account is not available....

View Article

Answer by Kevin for Why crontab scripts are not working?

Logging PermissionsA very simple crontab, won't execute because /var/log/ is not writable by luser account!* * * * * /usr/local/bin/teamviewer_check >> /var/log/teamviewer.log...

View Article


Answer by AlonL for Why crontab scripts are not working?

=== Docker alert ===If you're using docker, I think it is proper to add that I couldn't manage to make cron to run in the background.To run a cron job inside the container, I used supervisor and ran...

View Article

Answer by kenorb for Why crontab scripts are not working?

If running scripts within /etc/cron.* directories, make sure your scripts:are executable,match the Ubuntu/Debian cron script namespace (^[a-zA-Z0-9_-]+$).So for example if you've script with extension...

View Article


Answer by mahemoff for Why crontab scripts are not working?

Another Gotcha:When you type crontab -e and save inside the editor, it won't have any effect. You have to exit the editor for it to add or update according to your changes (e.g. use :x in Vim).(crontab...

View Article

Answer by Philluminati for Why crontab scripts are not working?

If you have a command like this:* * * * * /path/to/script >> /tmp/outputand it doesn't work and you can't see any output, it may not necessarily mean cron isn't working. The script could be...

View Article


Answer by erjoalgo for Why crontab scripts are not working?

This happened to me recently: I had two lines that modified PATH, like this:PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/ernesto/binThen, later in the...

View Article

Answer by don.joey for Why crontab scripts are not working?

I once was working on a shared server with lots of restrictions. All the answers here (PATH, SHELL, bash -c,...) could not get my script to work in the crontab. It did work perfectly when I put the...

View Article

Answer by Martijn de Milliano for Why crontab scripts are not working?

When a task is run within cron, stdin is closed. Programs that act differently based on whether stdin is available or not will behave differently between the shell session and in cron.An example is the...

View Article
Browsing all 48 articles
Browse latest View live




Latest Images