home | list info | list archive | date index | thread index

[OCLUG-Tech] Simple Chron Job request

Good Day everyone, I know this is one that someone in the know can do in about 2 minutes and will take me a couple of hours of google time to figure out.

I would like to set up a chron job to add a record to a database in MySQL.

Background, I wish to do a reasonable test of our backup system on MySQL databases.

I have a TurnKey LAMP server setup, so now I wish to add a record to a table in a database (I haven't set anything up just yet it will depend on the data I can push into the table)

I can go into MySQL create Database, Create Table etc, so that is ok, so let's assume I have TestDatabase with TestTable with one field called TestData (type can be anything, but how about a date/time or string)

Now I would like to set up a chron that every X minutes (I would like something semi random, but let's say every 83 minutes if it is easy) add a new record to the database

date > mysqldatabse

Then between backups I will kill the machine and restore from backup and then run a mysqlcheck on the database.

In theory we should have dataloss (since the backup is not continuous) which is acceptable, a corrupted database will not be which is what I wish to verify

Thanks in advance for any assistance you can give.

T. James