Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a python script that I would like to run daily using anacron, but I haven't been able to get it to work.

The script is in my home directory, and I have put a symlink to it in /etc/cron.daily/. I saw somewhere that things here can't have dots in the filename, so the symlink has the .py extension removed (the original file still has it).

The python file does have #!/usr/bin/python on the first line.

This is my first experience with cron / anacron, and so I'm sure I'm making a dumb mistake - I just don't know what it is. Is a symlink a problem? Do I need the actual file there? Is the python script the problem? Do I need to run a bash script that will open the python script? Is there something else I'm not thinking of?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Dumb question, but is your script executable? Right click on file and then Properties. In Permissions tab ther should be checkbox to set script as executable.

share|improve this answer
    
Thanks very much! I knew it was something dumb. I checked the permissions on the symlink, and I assumed that the permissions represented the permissions on the original file. Changing the permissions on the original file looks to have done the trick! –  Jeremy Feb 18 '11 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.