<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cron on Michael’s Domain</title><link>https://jeltsch.org/en/tags/cron/</link><description>Recent content in Cron on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/cron/index.xml" rel="self" type="application/rss+xml"/><item><title>Why some scripts in the cron.hourly directory do not become executed</title><link>https://jeltsch.org/en/why_some_scripts_in_the_cron_hourly_directory_do_not_become_executed/</link><pubDate>Sat, 09 Jun 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/why_some_scripts_in_the_cron_hourly_directory_do_not_become_executed/</guid><description>&lt;p&gt;Because I have a very basic mp3 player that cannot play back anything but ISO-standard mp3s, I often need to re-encode podcasts which my podcast-catcher downloads (I use Amarok). I created bash scripts to re-encode all downloaded mp3s and to generate a new RSS feed based on the directory content where the re-encoded mp3s get stored. However, the scripts did not get executed every hour and the reason was their naming (&amp;ldquo;podacst_downsampling.sh&amp;rdquo;). There are quite strict rules how the names have to look like (which I don&amp;rsquo;t remember), but if you use only a-z characters you should be always fine. After renaming to &amp;ldquo;podcastdownsampling&amp;rdquo; everything worked fine.&lt;/p&gt;</description></item><item><title>Editing the crontab</title><link>https://jeltsch.org/en/editing_the_crontab/</link><pubDate>Thu, 24 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/editing_the_crontab/</guid><description>&lt;p&gt;We have a shared directory (/home/shared) on our computer and a usergroup called &amp;ldquo;shared&amp;rdquo;. The purpose is that we put things there that should be accessible (including writable) to several users of the system. If one user puts a file there, it can be read by others but not e.g. deleted. In order to fix this, we edited the crontab to execute every 5 minutes the following two commands: &lt;code&gt;chgrp -R shared /home/sharedchmod -R 744 /home/shared&lt;/code&gt;In order to do this we edited (as root of course) the /etc/crontab file by adding the line: &lt;code&gt;*/5 * * * * root run-parts /etc/cron.minutely&lt;/code&gt;This means execution every 5 minutes, every hour, every day, every month, every weekday the script run-parts should be executed as root taking all scripts from the /etc/cron.minutely as argument (we created this directory newly in addition to the already existing /etc/cron.hourly, etc.). We restarted crond (the crontab deamon) via the GUI (under RedHat 9 Menu-System Settings-Server Settings-Services).&lt;/p&gt;</description></item><item><title>How to backup mysql databases (mysqlhotcopy, mysqldump)</title><link>https://jeltsch.org/en/how_to_backup_mysql_databases_mysqlhotcopy_mysqldump/</link><pubDate>Sat, 16 Dec 2006 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/how_to_backup_mysql_databases_mysqlhotcopy_mysqldump/</guid><description>&lt;p&gt;There are different possibilities. If you have access to the machine where mysql is running, you should use:&lt;code&gt;mysqlhotcopy&lt;/code&gt; On our RedHat 8 server you just type:&lt;code&gt;/usr/bin/mysqlhotcopy --user=root --password=sdjksjd journal /path/to/backup/directory&lt;/code&gt; Alternatively:&lt;code&gt;/usr/local/mysql/bin/mysqldump --user=username -p phpgedview &amp;gt;phpgedview&lt;/code&gt; The path of the command is specific for the mysql install on a MacOS X machine.If you want to back up from another machine you can use the mysqldump command: &lt;code&gt;mysqldump --host=hostname_or_ipaddress --user=username -p phpgedview &amp;gt;phpgedview&lt;/code&gt; This example backs up the database phpgedview which is on the machine hostname_or_ipaddress.The actual database files are in subdirectories in /var/lib/mysql in case you don&amp;rsquo;t remember their names.To automatically backup a database via the network you can put a file with the following content to the /etc/cron.hourly directory:&lt;code&gt;!/bin/sh mysqldump --host=hostname_or_ipaddress --user=USER -pPASSWORD journal &amp;gt;mysqldump_journal&lt;/code&gt; This would create every hour a fresh backupfile called mysqldump_journal in the /etc/cron.hourly directory.&lt;/p&gt;</description></item></channel></rss>