crontab ftp

Posted on 2004-11-15
Last Modified: 2008-03-10
I'm looking for some assistance in setting up a crontab process to ftp 7 text files from a linux server to a windows 2k server. I've done very little work with linux on the command line. I know enough to get me around, but not enough to develop something. If someone has a suggestion on a resource to assist me or can write me an example script, that would be great.

- Ian
Question by:black0ps
    LVL 48

    Expert Comment

    To create a FTP script, use something like:


    ftp -inv <<EOF
    open hostname
    user username password
    cd somedir
    mput *.txt

    How often do you want it to run?  There's a few different ways to setup cronjobs.  
    LVL 7

    Author Comment

    I need to run it once a day.
    LVL 38

    Expert Comment

    The name of Tintin's script is /usr/local/bin/
    # crontab -e
    1 * * * * /usr/local/bin/ > /dev/null 2>&1

    LVL 38

    Expert Comment

    Sorry. it should be
    0 1 * * * /usr/local/bin/ > /dev/null 2>&1     <=== Every day at 1:00AM

    LVL 48

    Accepted Solution

    Alternatively, you can place your script in /etc/cron.daily (assuming you have vixie-cron installed)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now