Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created the below file in /etc/cron.d/

-rw-r--r--   1 root root   81 2011-07-10 14:56 foswiki

...and copied the below into the file:

* * * * * cd /var/lib/foswiki && perl -I bin tools/mailnotify -user AdminUser -q

I assumed that this would run every minute. It does not appear to run at all however. The script is part of a Foswiki installation (likely irrelevant to the question) and does run manually, which leads me to think I've done something wrong in setting up the above. Is it a file permissions issue? Any help is appreciated. Thanks.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

For system-wide (non-user) crontab files, you need to specify a username to run the command with its permissions. For example:

* * * * * root cd /var/lib/foswiki && perl -I bin tools/mailnotify -user AdminUser -q

The above example will run your comman with the permissions of the root user, if you want to change that replace root with some other username.

share|improve this answer
    
Thanks, I didn't know that. In this case it had no effect however. Useful to know though. Thanks. –  Tim Jul 10 '11 at 15:38
    
Make your file executable: chmod 0755 /etc/cron.d/foswiki. –  Vladimir Blaskov Jul 10 '11 at 15:47
    
Thanks, Still no luck. I guess it's something else that's the problem. I'll close this. unresolved. Thanks. –  Tim Jul 10 '11 at 19:03

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.