1. Your script should definitely not reside in "/usr/local", but in "/usr/local/bin". See the File System Hierarchy Standard, which is a very good guideline for what to place where.
3. You should redirect <stdout> and <stderr> in your cron line, either to a log file or to "/dev/null". Otherwise you will get strange mails to the user account the cron job runs under. Modify your line to something like this:
Corollary: you might ask yourself why i did not use "> /dev/null 2>&1". First, i find this easier to read. Second, this will do the same regardless of order, while "2>&1 > /dev/null" will not do the same when written this way or the other way round.
I believe that crob invokes command under bash. But most of our work are
carried out using c shell. So what do I need to be aware of (or what precautions should I be taking) when I use cron. (1 Reply)
I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Hi,
How to monitor whether a cron job is running or errored out..?other than checking the process using ps-aef
how to enter the cron job which throws the output in 1 file and errors in other file. i remember it can be done using >1 and >2 ..but not sure..
any expert..please help!! (1 Reply)
I need to write the cron job for the following scenario, Please help me out
The CRON job runs sometime at night on Saturday and checks if there are more than eight files in the /PROCESSED folder. Any files over and above eight are deleted based on ascending order of date (eight most recent... (10 Replies)
i have just installed a cron job to run at 3 in the morning once a week. It's difficult for me to test if it works because the email backup program takes the email service down before running the backup. I wondered if i could ask you gurus if this would work?
0 3 * * 0 ... (1 Reply)
Hi ,
I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility )
I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Hi,
1)
If some job supposed to run on 1st of every month at 7 AM
In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day?
2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct)
And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies
LEARN ABOUT NETBSD
paths
PATHS(3) BSD Library Functions Manual PATHS(3)NAME
paths -- default system paths
SYNOPSIS
#include <paths.h>
DESCRIPTION
The <paths.h> header defines some default paths used in NetBSD. All defined constants are prefixed with _PATH. The constants include:
o The default user search path set by login(1) and associated utilities such as rshd(8). This is defined by _PATH_DEFPATH and
includes directories such as /usr/bin and /usr/local/bin.
o Default paths for some utilities and device nodes. Examples include such paths as /dev/null (_PATH_DEVNULL), /dev/mem (_PATH_MEM),
and /etc/nologin (_PATH_NOLOGIN), among others.
o Paths for some default directories such as /dev (_PATH_DEV) and /tmp (_PATH_TMP) as well as paths for some miscellaneous utilities
such as csh(1), /bin/csh (_PATH_CSHELL).
SEE ALSO whereis(1), sysexits(3), types(3), hier(7)CAVEATS
The <paths.h> header is specific to NetBSD.
BSD April 8, 2011 BSD