Solved

scripting cron jobs on a Red Hat box

Posted on 2013-12-02
3
363 Views
Last Modified: 2014-01-02
Hi,
It has been a few years since I scripted a Cron job, now I need to do it in Linux.

Anyone have good links for this?  

I need to known
1. Where to place the file
2. How to place it in the Cron scheduler

Thanks.
0
Comment
Question by:NYGiantsFan
3 Comments
 
LVL 25

Assisted Solution

by:SStory
SStory earned 167 total points
ID: 39690305
It depends upon if it i will be ran by root, local user or what. You could actually place it anywhere depending upon what it does.

2.
crontab -e

create the entry
ESC
:
qw
to save

#---------------- Minute (0 - 59)
  |  #------------- Hour (0 - 23)
  |  |  #---------- Day of the Month (1 - 31)
  |  |  |  #------- Month (1 - 12)
  |  |  |  |  #---- Day of the Week (0 - 6) (Sunday=0 or 7)
  |  |  |  |  |
  *  *  *  *  *  example-script.sh
(source: http://community.linuxmint.com/tutorial/view/1072)
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 166 total points
ID: 39691021
You need to log in as the user under which you want the job to run. Then use crontab -e to insert the job, crontab -l to check it inserted OK.
0
 
LVL 16

Accepted Solution

by:
Joseph Gan earned 167 total points
ID: 39693841
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 45
Delete email that have a topic like  Cpanel 3 69
Backup & Restore 3 47
Can't ping New Linux Servers 40 28
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now