title: Linux Customized Cron - Run a cron from Mysql
body: <p>I have a web server running multiple vhosts and each vhost has a lot of jobs that need to run that are both web requests and ruby.</p>
  
  <p>For example, I have to run a ruby script every 2 min to check email, 
  then another ruby script once an hour to check for updates.
  then I need to run a webpage at 6 pm every night to send me an email report.
  then I need to run another webpage every 6 hours for general tasks.</p>
  
  <p>So how i currently do it is in crontab and i enter a new line for each entry
  for the ruby scripts i just call the rb file and for webpages i run wget and it does work perfectly</p>
  
  <p>the problem is that im now starting to get alot of entries 100+ in my crontab
  i if i write a new script i have to fo add the entry for each vhost in crontab (And problems happen when i miss one)</p>
  
  <p>What i was hoping to build a cron in mysql then for each virtual hosts call the "mysql cron" once then it will add the rest.</p>
  
  <p>Then i only need one entry in crontab, and iff i need to add a new schedule in  i just have to write an entry into mysql</p>
  
  <p>Does anyone have any idea how i could do this</p>