05-27-2014
Quote:
Originally Posted by
bakunin
If you do it manually, put everything you do manually into a script. This is - in principle - easily done by writing every command you use now into a text file, add a "shebang" line (this is a word you can search for on the net) and use "chmod" to set the executable-bit in the filemode. It is about that simple.
If you want to execute this script recurringly in some interval (like "every 5 minutes", "every day at 10:00 am", etc.) put it into "cron" (search for this on the internet). If you have a concrete question dealing with the implementation of this just check back.
I hope this helps.
bakunin
Thanks for answer.
I have another question: how can i add pdf file (binary (in BLOB) and it's extension to mysql using script. Cause i was doing this with php and this is a little bit different.
Code example will be really nice
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server (sdmc222.sdmc.cp-srv.com) which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :-
ftp... (3 Replies)
Discussion started by: marconi
3 Replies
2. AIX
Hello UNIX gurus, I need to install the mysql odbc connector with unixODBC on my AIX 5.3 machine. I have a mySQL database running on another server (Ubuntu 7.04). The SQL database works fine. The problem I am having is when trying to run ./configure for mysql-connector-odbc it seems to be looking... (1 Reply)
Discussion started by: raidzero
1 Replies
3. IP Networking
hello i have a ubuntu ssh server that i can acess from any of my comnputers but only if they are on the same wireless network as the server. i tested trhis my tehtehring my samsung blackjack to my windows partition and installing openssh to windows it works when windows is on the wireless but no... (1 Reply)
Discussion started by: old noob
1 Replies
4. UNIX for Dummies Questions & Answers
I am logged into a server via SSH.
There is a file on my desktop of my Windows PC I would like to put on that server.
How do I do it?
SCP looks the likely method but how does the server know where the file is on the local machine?
Thanks. (2 Replies)
Discussion started by: Sepia
2 Replies
5. Shell Programming and Scripting
Hello,
I've been searching your forum for an answer to the following question and whilst I've seen several which may help I'm afraid my inexperience with UNIX systems has got the better of me and I'm incapable of piecing your considerable expertise together.
Problem:
I have a linux box which... (5 Replies)
Discussion started by: julezsht
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am a newbie to AIX, so please bear with me. I have mounted a dvd drive on AIX. I am trying to copy the file that is on the dvd drive on to the local machine. However, I get an error:
cp: c1m_0001.gz: A system call received a parameter that is not valid.
Can some one point me to the... (1 Reply)
Discussion started by: anurag1510
1 Replies
7. IP Networking
I have two PCs, witch have Linux Ubuntu.
I want to connect those computers by a local network, but I know right anything about the network.
I have a modem (not router) and a router that i don't use.
The desktop pc have 2 network cards. (eth0 eth1). The modem is on eth1.
Anyone help me!... (4 Replies)
Discussion started by: mghis
4 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am trying to copy a file from remote desktop to my local system using copy and xcopy commands...but none of them worked..is there any batch file or commands to do the copying .if do please share with me..... (5 Replies)
Discussion started by: navsan420
5 Replies
9. Shell Programming and Scripting
Hi friends,
i need to prepare a script ( in perl)
i have a file called "demo.exe" in my local unix host.
i have a list of remote hosts in a file "hosts.txt"
now i need to push "demo.exe" file to all the hosts in "hosts.txt" file.
for this i need to prepare a script(in perl, but shell... (5 Replies)
Discussion started by: siva kumar
5 Replies
10. Shell Programming and Scripting
Hi,
Is there a way I can copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp?
I tried this but it just rename the file as the folder it has to be transferred at.
scp -r name@some_server:/home/user/file.txt 'somehere\home\home_dir'
Thanks. (4 Replies)
Discussion started by: erin00
4 Replies
LEARN ABOUT CENTOS
anacrontab
ANACRONTAB(5) File Formats ANACRONTAB(5)
NAME
/etc/anacrontab - configuration file for Anacron
DESCRIPTION
The /etc/anacrontab configuration file describes the jobs controlled by anacron(8). It can contain three types of lines: job-description
lines, environment assignments, or empty lines.
Job-description lines can have the following format:
period in days delay in minutes job-identifier command
The period in days variable specifies the frequency of execution of a job in days. This variable can be represented by an integer or a
macro (@daily, @weekly, @monthly), where @daily denotes the same value as the integer 1, @weekly the same as 7, and @monthly specifies that
the job is run once a month, independent on the length of the month.
The delay in minutes variable specifies the number of minutes anacron waits, if necessary, before executing a job. This variable is repre-
sented by an integer where 0 means no delay.
The job-identifier variable specifies a unique name of a job which is used in the log files.
The command variable specifies the command to execute. The command can either be a command such as ls /proc >> /tmp/proc or a command to
execute a custom script.
Environment assignment lines can have the following format:
VAR=VALUE
Any spaces around VAR are removed. No spaces around VALUE are allowed (unless you want them to be part of the value). The specified
assignment takes effect from the next line until the end of the file, or to the next assignment of the same variable.
The START_HOURS_RANGE variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for
example, due to a power down, then scheduled jobs are not executed that day.
The RANDOM_DELAY variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for
each job. A RANDOM_DELAY set to 12 would therefore add, randomly, between 0 and 12 minutes to the delay in minutes for each job in that
particular anacrontab. When set to 0, no random delay is added.
Empty lines are either blank lines, line containing white spaces only, or lines with white spaces followed by a '#' followed by an arbi-
trary comment.
You can continue a line onto the next line by adding a '' at the end of it.
In case you want to disable Anacron, add the 0anacron cron job (which is a part of crontab(1)) into the /etc/cron.hourly/jobs.deny direc-
tory.
EXAMPLE
This example shows how to set up an Anacron job similar in functionality to /etc/crontab which starts all regular jobs between 6:00 and
8:00 only. A RANDOM_DELAY which can be 30 minutes at the most is specified. Jobs will run serialized in a queue where each job is started
only after the previous one is finished.
# environment variables
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
RANDOM_DELAY=30
# Anacron jobs will start between 6am and 8am.
START_HOURS_RANGE=6-8
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
1 5 cron.daily nice run-parts /etc/cron.daily
7 0 cron.weekly nice run-parts /etc/cron.weekly
@monthly 0 cron.monthly nice run-parts /etc/cron.monthly
SEE ALSO
anacron(8), crontab(1)
The Anacron README file.
AUTHOR
Itai Tzur <itzur@actcom.co.il>
Currently maintained by Pascal Hakim <pasc@(debian.org|redellipse.net)>.
For Fedora, maintained by Marcela Malaova <mmaslano@redhat.com>.
cronie 2012-11-22 ANACRONTAB(5)