I have a script that works when I run it from the command line, but when I schedule it with cron I get errors that it cannot find files or commands. My questions is two fold:
When I schedule a cron job by using crontab -e does it use my user ID as the basis for it's permissions?
What might cause cron to suddenly report a file it is supposed to run is "not found," when the file hasn't been touched, and in fact, the entire system hasn't been touched since it last ran successfully?
I have a cronjob schedule I define by doing sudo crontab -e
In it, I have dozens of cron jobs that run successfully..
I created a new file "dbbackup" in /etc/cron.daily that contains a simple database backup script.
#!/bin/sh
mysqldump -h localhost -u user -p'passord' database_name > /var/www/sites/example.com/backups/db_backup_"`eval date +%u%m%Y`".sql
Now the problem is that this file is not being automatically run, I am fairly new to linux servers but from reading around I found that this is the locatio
I have written 7 scripts all together into 1 script called runall.sh in my /home/student directory.
I want to use crontab to run this script every day at night (11:00 PM).
I have tried the following using crontab -e:
PATH=/home/student
00 23 * * * /home/student/runall.sh >> /var/log/script_output.log 2>&1
I have also tried putting this in /etc/crontab like this:
SHELL=/bin/sh
PAT
How can I run a cron command with existing environmental variables?
If I am at a shell prompt I can type echo $ORACLE_HOME and get a path. This is one of my environmental variables that gets set in my ~/.profile.
I have a cron job which unzips a file and executes it. The cron is set to unzip, execute and delete the .zip file after. It's executing fine but it's not deleting the file.
If I scp a cron file into /etc/cron.d it doesn't run unless I edit the file and change the command. Then crond seems to pick up the cron file.
How can I make cron reload its cron files in ubuntu 10.04? 'touch'ing the file doesn't work nor does 'restart cron' or 'reload cron'.
My cron file is set to run every minute and logs to a file.
After upgrading from Mythbuntu 11.04 to 12.03 cron does not appear to be working. I have scripts in /etc/cron.daily and /etc/cron.weekly that aren't running.
I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system.