CRON job to regularly download a database

Discussion in 'Programming' started by jquindlen, Nov 2, 2006.

  1. #1
    Hey there. I've been struggling to get a CRON job setup to download a CSV file on a daily basis. I know the CRON syntax, that's not the problem, I just need to figure out what command to use to make the file download to a specific directory on my server. I'm pretty rusty on my Linux and I'm struggling. Any tips or advice?
     
    jquindlen, Nov 2, 2006 IP
  2. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I've done something similar (I wasn't storing the database on the server) but I just cheated, wrote a script in PHP to handle everything and then called that script using a cron job.

    I know you said you are familiar with setting up a cron job but if you are interested I wrote an overview on my blog - Using cron with PHP
     
    streety, Nov 2, 2006 IP
  3. jquindlen

    jquindlen Notable Member

    Messages:
    1,725
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    220
    Digital Goods:
    1
    #3
    lol. I'm an idiot. A PHP script would be the way to go, and the CRON job for that I could write in my sleep. Thanks for the inspiration. Nice blog post too. Very in depth, and a perfect starting point for those new to CRON jobs. Thanks!
     
    jquindlen, Nov 2, 2006 IP
  4. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're welcome, sometimes all it takes is a fresh perspective.
     
    streety, Nov 2, 2006 IP
  5. Kingfox

    Kingfox Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hi ,

    Today I called to my host and they tell me that we have not support Cron job and I can Download it and Upload on my FTP .

    Do you have a Url or site that I can Download it ?

    thx
     
    Kingfox, Nov 20, 2006 IP
  6. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Unless you have a vps or a dedicated server I don't know of a way to install the cron daemon.

    There are ways that you can simulate cron but it is messy and can cause slow page loads for your users.

    As a sidenote, the bold next really isn't necessary.
     
    streety, Nov 20, 2006 IP