LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-27-2015, 06:54 AM   #16
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled

This will probably not work even with executable bit set, you need to use full path to cruft to make sure it works.
 
Old 11-27-2015, 07:36 AM   #17
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
i wrote this 25? years ago, seldom edit it

very nice, ZERO compatibility/upgrade issues over years
which is typical for "real" unix apps rather than today's
malware unix apps (hacked to be incompatible every version)

------ part of etc/crontabs/root.all ------
 
1 members found this post helpful.
Old 11-27-2015, 07:36 AM   #18
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
# usage: time command
# Commands are executed by cron(8) when the minute, hour, and month of
# year fields match the current time, and when one of the two
# [day/dom/...] fields match the current time. If both
# [day/dom/...] fields match it is done TWICE.
# field allowed values
# ----- --------------
# minute 0-59
# hour 0-23
# day of month 1-31
# month 1-12 (or names, see below)
# day of week 0-7 (0 or 7 is Sun, or use names)

# shortcuts:
# @reboot, @yearly, @monthly, @weekly, @daily, @midnight, @hourly
# see crontab(5)

# Important: don't add extra *'s or that is command:
# but add enough stars for day and month.

# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system, but if they don't the average newbie
# might get quite perplexed about getting strange mail every 5 minutes. :^)
#
# Run the 'atrun' program every 5 minutes
# This runs anything that's due to run from 'at'. See man 'at' or 'atrun'.
# Note that this is commented out since it's not needed if you run atd. But,
# it's left as an example, since atd isn't strictly required. You can still
# run it this way instead.
#0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/atrun 1> /dev/null 2>
/dev/null

# example: at top of hour, every two hours from 11p.m. to 7a.m.,
# and at 8a.m.; only on mon-wed
# 0 23-7/2,8 * * mon-wed (any command bash takes)

PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11/bi
n:/home/scripts:/home/scripts/admin:/home/scripts/system"

# MINUTELY MINUTELY MINUTELY MINUTELY MINUTELY MINUTELY MINUTELY MINUTELY

5,20,35,50 * * * * [ -x /usr/sbin/flushpop.sh ] && /usr/sbin/flushpop.sh 1>
/dev/null 2> /dev/null

# HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY HOURLY

# sarge ping is buggy unlike slackare
5 */1 * * * foo 2>&1 >> /dev/null 2>&1 &

# DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY

# race cond. can prevent this from happening right at boot
# like to reset often but it's intrusive
1 1 */1 * * foo 2>&1 >> /dev/null 2>&1 &

# WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY WEEKLY

0 1 */7 * * echo "Subject: Have you updated the backup directories this week
?" | mail who@me.com &

# MONTHLY MONTHLY MONTHLY MONTHLY MONTHLY MONTHLY MONTHLY MONTHLY MONTHLY

10 5 */28 * * nice -n 17 sysinfo &

# ~~ make host timestamps in /tmp (time when cron visited time) ~~
0 0 * * * daily &
0 0 * * 0 weekly &
0 0 1 * * monthly &
0 0 * */12 * yearly &

# enjoy
 
1 members found this post helpful.
Old 11-27-2015, 07:38 AM   #19
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
dont forget the edit PATH to be appropriate for which user and programs are intended to run !
 
  


Reply

Tags
cronjobs, packages



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BASH: Add cron job to run hourly worm5252 Programming 9 03-26-2010 10:36 AM
add a job to cron.daily pbxuser911 Linux - Server 9 10-29-2009 12:30 AM
cron.hourly cron.weekly cron.monthly and 0anacron. Are they necessary? glore2002 Debian 2 09-30-2009 08:57 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration