Link to home
Start Free TrialLog in
Avatar of UnixKid
UnixKid

asked on

Cron Job

How can I write cronjob that executes a command and sends the output to another file.  Then I would like to schedule a job to run at 7:00 everyday.  Where can I find material to learn about cronjobs.
Avatar of ozo
ozo
Flag of United States of America image

man 5 crontab
ASKER CERTIFIED SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of m4rc
m4rc

i always put this as a comment on the top of my crontab,
as a reminder

#minute hour    mday    month   wday    command

and then add a comment before each entry so its easier to
understand the intention of the entry.

# at 7am every day run yourcommand and save the output to
# outfile
0 7 * * * /full-path-to/yourcommand > /tmp/outfile 2>&1
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by yuzh

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange