cron.daily and cron.hourly

Steve Bertrand iaccounts at ibctech.ca
Mon Jul 5 08:00:12 PDT 2004


> Hi,
>
> I had a problem with my web-server that I already solved. But now I have
> to
> execute a PHP file on my FreeBSD server every hour, to get the needed
> updates from database.
>
> I know I need a shell script to execute that file and have to put this
> script to some directory that would execute it every hour.
>
> In linux it is appeared to be at /etc/cron.hourly
>
>
> but in FreeBSD I can't locate it.
>
> Any one can help ?!

Each user in FreeBSD can have their own cron list. You can edit a users
crontab like this:

# crontab -u username -e

and then add the following into it to run your app at 1 minute after every
hour of every day of every month:

1 * * * * /path/to/app/app.sh

You can also feed parameters after the command you want to run.

See man(5) crontab for a good description of the layout of the crontab
entries.

Regards,

Steve

>
> Regards
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>




More information about the freebsd-questions mailing list