Quantcast
Browsing all 48 articles
Browse latest View live

Answer by Michael Mather for Why crontab scripts are not working?

If crontab mentions something like run-parts /etc/cron.daily, then run-parts may be refusing to run your script. In my case the script in cron.daily did not start with #!/bin/sh.I discovered this by...

View Article


Answer by user166286 for Why crontab scripts are not working?

I had a problem with a script that called grep with a regular expression. Some regexs worked when the script was called from crontab while others did not, e.g. [[:print:]] did not work. It turns out...

View Article


Answer by Alexandre for Why crontab scripts are not working?

Although you can define environment variables in your crontable, you're not in a shell script. So constructions like the following won't...

View Article

Answer by John Peterson for Why crontab scripts are not working?

Insecure cron table permissionA cron table is rejected if its permission is insecuresudo service cron restartgrep -i cron /var/log/syslog|tail -22013-02-05T03:47:49.283841+01:00 ubuntu cron[49906]:...

View Article

Answer by JohnGH for Why crontab scripts are not working?

If you are accessing an account via SSH keys it is possible to login to the account but not notice that the password on the account is locked (e.g. due to expiring or invalid password attempts)If the...

View Article


Answer by Doug for Why crontab scripts are not working?

If you edited your crontab file using a windows editor (via samba or something) and it's replaced the newlines with \n\r or just \r, cron won't run.Also, if you're using /etc/cron.d/* and one of those...

View Article

Answer by allaptr for Why crontab scripts are not working?

I was writing an install shell script that creates another script to purge old transaction data from a database. As a part of the task it had to configure daily cron job to run at an arbitrary time,...

View Article

Answer by Mange for Why crontab scripts are not working?

Building off what Aaron Peart mentioned about verbose mode, sometimes scripts not in verbose mode will initialize but not finish if the default behavior of an included command is to output a line or...

View Article


Answer by Mange for Why crontab scripts are not working?

Writing to cron via "crontab -e" with the username argument in a line. I've seen examples of users (or sysadmins) writing their shell scripts and not understanding why they don't automate. The "user"...

View Article


Answer by Aaron Peart for Why crontab scripts are not working?

cron script is invoking a command with --verbose optionI had a cron script fail on me because I was in autopilot while typing the script and I included the --verbose option: #!/bin/bashsome commandstar...

View Article

Answer by Lenik for Why crontab scripts are not working?

The script filenames in cron.d/, cron.daily/, cron.hourly/, etc., should NOT contain dot (.), otherwise run-parts will skip them.See run-parts(8): If neither the --lsbsysinit option nor the --regex...

View Article

Answer by Daniel Tet for Why crontab scripts are not working?

It is also possible that the user's password has expired. Even root's password can expire. You can tail -f /var/log/cron.log and you will see cron fail with password expired. You can set the password...

View Article

Answer by JMS for Why crontab scripts are not working?

If your crontab command has a % symbol in it, cron tries to interpret it. So if you were using any command with a % in it (such as a format specification to the date command) you will need to escape...

View Article


Answer by luissquall for Why crontab scripts are not working?

I had some issues with the time zones. Cron was running with the fresh installation time zone. The solution was to restart cron: sudo service cron restart

View Article

Answer by andrew for Why crontab scripts are not working?

If your cronjob invokes GUI-apps, you need to tell them what DISPLAY they should use.Example: Firefox launch with cron.Your script should contain export DISPLAY=:0 somewhere.

View Article


Answer by Phil Dodd for Why crontab scripts are not working?

Cron daemon could be running, but not actually working. Try restarting cron:sudo /etc/init.d/cron restart

View Article

Answer by Ian Mackinnon for Why crontab scripts are not working?

In many environments cron executes commands using sh, while many people assume it will use bash.Suggestions to test or fix this for a failing command:Try running the command in sh to see if it works:sh...

View Article


Answer by pjmorse for Why crontab scripts are not working?

Script is location-sensitive. This is related to always using absolute paths in a script, but not quite the same. Your cron job may need to cd to a specific directory before running, e.g. a rake task...

View Article

Answer by BillThor for Why crontab scripts are not working?

The most frequent reason I have seen cron fail in an incorrectly stated schedule. It takes practice to specify a job scheduled for 11:15 pm as 15 23 * * * instead of * * 11 15 * or 11 15 * * *. Day of...

View Article

Answer by pbr for Why crontab scripts are not working?

Crontab specs which worked in the past can break when moved from one crontab file to another. Sometimes the reason is that you've moved the spec from a system crontab file to a user crontab file or...

View Article
Browsing all 48 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>