cron

Help, my Drupal 8 database is huge

Earlier today I ran into a problem making a Drupal 8 database backup. I ran the usual mysqldump backup command, and when it kept running for a long time I decided to kill it, and then began investigating the problem. I knew that I had recently deleted all of the log records, and the Drupal cron task was running correctly, so something else was going on. In short, I found that my Drupal 8 database was huge.

Mac launchctl StartInterval not working

It looks like the Mac launchd launchctl StartInterval is broken in Mac OS X 10.6.x, at least the current version (10.6.7). When I run a Mac launchctl script like this, which used to work just fine:

Mac crontab: Mac OS X startup jobs with crontab, er, launchd

Mac OS X crontab FAQ: How do I run a Unix job (or shell script) through the OS X crontab facility? I keep trying to edit my Mac crontab file, but my Mac won't save my crontab changes, or run my program.

Mac OS X - crontab, launchd, and launchctl

As of this writing (updated in 2014), the Mac crontab command seems to be deprecated on Mac OS X, and the Apple documentation encourages you to use their "Mac launchd" facility. Here's a blurb from the Mac OS X crontab man page:

Mac OS X launchd examples (launchd plist example files) alvin May 17, 2010 - 7:32pm

Mac OS X launchd FAQ: Can you share some Mac launchd examples (also written as launchd plist examples, or launchctl examples)?

In an earlier tutorial (Mac OS X startup jobs with crontab, launchctl, and launchd) I demonstrated how to use the Mac OS X launchd facility instead of cron to run what would normally be a cron (crontab) job. As I started working with launchd and launchctl, I realized it would probably be helpful to see several different launchd examples, specifically launchd plist file examples.

A Linux crontab mail command example

Linux crontab mail FAQ: Can you share an example of a Linux crontab entry you use to send email on a regular basis?

Here's the source code for a really simple Linux mail script that I used to send an email message to one of my co-workers every month. This script used the Unix or Linux mail command to email a file to her that showed a list of all the websites on our server that she needed to bill our customers for.

Here's the source code for the email shell script:

Edit your crontab file with “crontab -e”

Linux crontab FAQ: How do I edit my Unix/Linux crontab file?

I was working with an experienced Linux sysadmin a few days ago, and when we needed to make a change to the root user crontab file, I was really surprised to watch him cd to the root user’s cron folder, make changes to the file, then do a kill -HUP on the crontab process.

Thinking he knew something I didn’t know, I asked him why he did all of that work instead of just entering this:

Example Linux crontab file alvin October 21, 2009 - 10:25am

Linux crontab format FAQ: Do you have an example of a Unix/Linux crontab file format?

I have a hard time remembering the crontab file format, so I thought I’d share an example crontab file here today. The following file is the root crontab file from a CentOS Linux server I use in a test environment.

Securing the Drupal cron.php script

I don't know how big of a deal it is yet, but as I learn more about Drupal and security, I just tightened down access to the Drupal cron.php script on this site.

One thing Drupal does is make a "cron" script available off of your root URL, and by default that script is made publicly available. I don't know exactly how this works yet (other than knowing that it fires off several Drupal cleanup tasks), but I really don't want to make that URL publicly available, so after digging around I found this nice Apache configuration solution here: