Re: Strange cron behavior
On Wed, Oct 04, 2006 at 06:23:39AM -0400, stan wrote: On Tue, Oct 03, 2006 at 11:22:29PM -0500, Philip Hallstrom wrote: I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. Sugestions? Is the cron daemon running? What is the output in /var/log/cron? Forgot to mention that. Yhe script does get listed in /var/log/cron as having been invoked. -- Unix is very simple, but it takes a genius to understand the simplicity. (Dennis Ritchie) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Can you run the script with the -x option? eg. #!/bin/sh -x -Damian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange cron behavior
On Tue, Oct 03, 2006 at 11:22:29PM -0500, Philip Hallstrom wrote: I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. Sugestions? Is the cron daemon running? What is the output in /var/log/cron? Forgot to mention that. Yhe script does get listed in /var/log/cron as having been invoked. -- Unix is very simple, but it takes a genius to understand the simplicity. (Dennis Ritchie) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange cron behavior
On Wednesday 04 October 2006 01:05, stan wrote: I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. You can set environmental variables in the crontab file, see crontab(5) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Strange cron behavior
I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. Sugestions? -- Unix is very simple, but it takes a genius to understand the simplicity. (Dennis Ritchie) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange cron behavior
I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. Sugestions? Is the cron daemon running? What is the output in /var/log/cron? -p ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange cron behavior
On 10/3/06, stan [EMAIL PROTECTED] wrote: I'm having a hard time getting cron to run a task. I've run crontab -e (as root), and added the following line: 12 * * * * /usr/local/bin/mirror_ubuntu This script runs from teh command line. Now I've seen plenty of strange beahviour because of the limited environment cron tasks get, but a basic echo test /tmp/stan isn't even creating the file. Sugestions? Even your basic script is making assumptions about the environment. When writing cron scripts always use full-path to your executables and be very aware of when you are globbing. If I recall, cron won't allow globbing (the '*' and '?' characters in paths) in commands unless explicitly enabled, and the only path you get is that defined in your crontab. -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]