Questions tagged [cron.daily]

29 questions
30
votes
8 answers

Robustly disabling specific cron.{hourly,daily,weekly} script

On various systems that I administer, there are cron scripts that get run via the commonly-used /etc/cron.{hourly,daily,weekly} layout. What I want to know is whether there's any common 'disable this script' functionality. Obviously, simply…
benizi
  • 452
  • 1
  • 5
  • 7
20
votes
6 answers

APT FATAL -> Failed to fork

I saw a lot of questions regarding this, but mine seems a little different. Here's what I receive: /etc/cron.weekly/apt-xapian-index: FATAL -> Failed to fork. run-parts: /etc/cron.weekly/apt-xapian-index exited with return code…
MultiformeIngegno
  • 1,627
  • 9
  • 24
  • 31
4
votes
3 answers

How to launch crontab commands inside of certain screen sessions?

I have a crontab that runs like this: 0 0 * * * /execute/shell/script.sh 0 0 * * * /execute/shell/script1.sh 0 0 * * * /execute/shell/script2.sh And, I want to launch each script in a different screen. But I want to keep that screen running so…
makansij
  • 255
  • 4
  • 11
4
votes
2 answers

How to recreate /etc/cron.daily/apt?

On my Debian 6.0.8 system the /etc/cron.daily/apt file is missing. Therefore, unattended upgrades do not work. How can I recreate/fix /etc/cron.daily/apt?
robert
  • 143
  • 6
4
votes
1 answer

How can I create cron jobs in specific files on Linux Centos

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 /home/user/scripts/backup.sh 30 3 * * 1-5 /home/user/scripts/backup2.sh…
MOtaro Site
  • 193
  • 2
  • 3
  • 13
4
votes
1 answer

logrotate cron job not rotating certain logs

I added two scripts in "logrotate.d" directory for my application logs to be rotated. This is the config for one of them: { compress copytruncate delaycompress dateext missingok notifempty daily rotate 30 } There is…
user2206396
  • 221
  • 1
  • 2
  • 6
3
votes
2 answers

Cron daily running twice

On my CentOS 7 server, errors generated by a nightly backup script that should have run fine caused me to check on my cron activity. I discovered that cron.daily is running twice - here is the relevant section of /var/log/cron after I removed my…
OsakaWebbie
  • 183
  • 1
  • 11
3
votes
0 answers

/etc/cron.daily/locate has blank line. File is readonly can't edit

I get this output every day. /etc/cron.daily/locate: run-parts: failed to exec /etc/cron.daily/locate: Exec format error run-parts: /etc/cron.daily/locate exited with return code 1 File contents with a blank beginning line: #!/bin/sh exit 0 This…
2
votes
2 answers

How to add cronjobs to /etc/cron.daily/

We have to use crontab -e to add a cronjob to crontab. And crontab -r to remove cronjobs. Here, no Copy & Paste not allowed. I need to add a script to cron.daily, how to add?
Md Mahbubur Rahman
  • 414
  • 2
  • 7
  • 15
2
votes
2 answers

CentOS 6.2 cron.daily

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…
Alex
  • 209
  • 5
  • 12
1
vote
1 answer

How can I make an environment variable visible to a script placed in /etc/cron.daily?

Say I have a script named "mydailyscript" containing the following: #!/bin/bash if [ ! -z $MYDAILYLOG]; then exec 1>$MYDAILYLOG fi echo This script ran on $(date) and I then copy this script to /etc/cron.daily. Where do I define the environment…
1
vote
3 answers

Logwatch sends me 2 copies of yesterday's server activity, why?

I use Logwatch to track what is going on on one of my Fedora 11 boxes. Since updating it from an older Fedora release I now get 2 copies of the same information to my inbox. I cannot find where this might be getting duplicated. I was assuming it…
ricbax
  • 169
  • 1
  • 11
1
vote
1 answer

Cronjob not working properly on debian

I'm trying to run a PHP script everyday at midnight, so my cron has the following entry @daily /usr/bin/php /websites/xxz/misc/wU5HaFre.php /websites/xxz/misc/wU5HaFre.php has 755 rights, so it's executable. which php provides /usr/bin/php, whereis…
user145429
1
vote
1 answer

When will ANACRONTAB run cron.daily?

My RHEL has the following anacrontab config file, it has START_HOURS_RANGE and RANDOM_DELAY both missing, what hour does cron.daily start everyday? My guess is it is random. Is it true? # /etc/anacrontab: configuration file for anacron # See…
johnsam
  • 225
  • 1
  • 6
1
vote
1 answer

preventing tmpwatch from clobbering archives that were "just" unpacked into /tmp

I have an application that unpacks an archive into /tmp, restoring the extracted files' modification and access times. Sometimes these files and the enclosing archive are many years old. After the files are extracted (sometimes many minutes or…
jhfrontz
  • 273
  • 2
  • 13
1
2