Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, i trying to auto receiving email by fetchmail and run some code by itself using crontab. i have no problem running the code manually but when i run the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    1

    Unhappy error: No such file or directory


    Hi, i trying to auto receiving email by fetchmail and run some code by itself using crontab. i have no problem running the code manually but when i run the crontab the error will occured. Below is my crontab:

    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/nsn/script.sh

    and the script.sh is the code i wish to run. Below is the code:

    fetchmail -f /home/nsn/.fetchmail.rc pop.gmail.com

    mv /var/spool/mail/nsn /usr/local/src/app/mailmap/app/models

    cd /usr/local/src/app/mailmap/app/models

    ruby mailer.rb nsn

    mv /usr/local/src/app/mailmap/app/models/nsn /usr/local/src/app/mailmap/Mails


    I have problem moving the file to another directory. For example;
    when it execute this line mv /var/spool/mail/nsn /usr/local/src/app/mailmap/app/models

    it will say mv: cannot move `/var/spool/mail/nsn' to `$/usr/local/src/app/mailmap/app/models': No such file or directory

    Please help, Thanks

  2. #2
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    What's the '$' at the start of the destination path?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •