Re: FTP: 421 Service not available....

On Mon, 18 Jun 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <1182189289.228555.125450@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, erick-flores

Here is whats happening and its getting more confused:
This ftp process runs from a crontab. It runs every day (mon-fri) @
19:30. When it runs it fails. But then when i run (the exact same
script) manually @ 8.35 every morning it runs just fine.

Do you know if the DGSUX ftp server has any access time limitations?

Can be something wrong in the crontab then?

Most certainly yes. The environment in cron is SUBSTANTIALLY less than
in your shell. Use the command 'set' to see the difference. As a user
on this system, I see

[compton ~]$ set | wc -l
[compton ~]$

41 lines of settings. As root, it's 44. In a cron task, it's only 20
lines, and those "missing" lines constantly trap individuals. Another
common problem is the PATH - in cron, it's usually quite restricted
(perhaps only "/sbin:/bin:/usr/sbin:/usr/bin" - notice the lack of
"local" directories). Finally, though I'm not sure it's a problem,
cron doesn't "own" a terminal, so you may run into problems with where
'stdout' is going.

this is how my crontab looks like:
30 19 * * 1-5 /usr/local/bin/x.autoextract # Extract orders

"/usr/local/bin" - this will _run_ OK, as long as _if_ it is calling
stuff that isn't in PATH, it calls it with a full pathname as you've
done in this crontab entry.

Second question - which crontab is this (system, or user?) and which
cron daemon in this. Neither here or in your original post do you
identify the Linux distribution and release. For a _system_ crontab
(/etc/crontab) entry using 'vixie-cron' (the most common cron daemon),
there should be a variable between 'day-of-week' and 'command' that
identifies the user to run this job as. If this is an individual user's
crontab, OR if you are using 'dillon-cron' (found in Slackware and
clones), the username field should not be included (the way you show
this entry).

Note that neither 'vixie-cron' or 'dillon-cron' allow comments on
the individual command line - they are passed to the shell as if they
are part of the command, and that may not be what you desire.

Old guy

Relevant Pages

  • Re: Running DBI, ODBC in the crontab
    ... Run the following lines in both the command line and crontab: ... Any of the paths that are missing in cron ... This communication is issued by UBS AG or an affiliate by the ...
  • SUMMARY: cron entry: nth day of every month?
    ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
  • Re: Cron job question
    ... > From: (Cron Daemon) ... You've made the classic mistake of confusing the system crontab ... extra column defining which user ID the command should be run as. ... any new cron jobs for any user (including root) and leave the system ...
  • Re: [opensuse] Re: cron problems
    ... The exception is when your crontab line starts ... your ipdetect cron job really works, you might want to turn off job start ... Your crontab syntax itself is OK, ... userid in it, before the command, has just the command. ...
  • Re: [SLE] rsync log
    ... If you type kcron you should get the ... What this means is the non-error output from a command like rsync prints ... the standard output of a cron job is emailed ... kcron is just a GIU way to specify your crontab ...