Hi guys today i'll bring to you a new problem that i need to execute.
So what i need to do it's create a script that:
conect to some database
logon
run a .sql script
logoff
and close the connection
after that, put this script on the crontab
To set up the crontab it's ok for me, i think it's not a big deal.
I would like to add some python script to path.
I can add bash scripts to folders in my path and then execute them from everywhere.
When I do so with python script, I can only execute them when I am in the same directory.
I have a strange thing (i think),
I added a line in my crontab on an QNAP NAS with crontab -e i saved (:wq!)
This line would have had a script to run for every 5 minutes so i dit 5 * * * * and the script name.
And restarted the crontab.
This script fills a database.
Last night i quit trying, went to bed and kept de NAS running.
And wen ik woke up this morning i looked at the database and the scr
I have N number of python scripts which i am receiving from REST web server and i am saving them in /home/mandar/ . Now i want to write a script to run all the python scripts from this directory and monitor them every minute...if any process is dead or hung it should be restarted by this script.
I have the following Python script, chmod +x'd.
Hi Experts,
I would like to know, what does "2>&1" do in crontab?
example:
* * * * * /export/user/home/test.sh >> /export/user/home/logtest.log 2>&1
My colleague told me the commabd 2>&1 mean to prevent crontab sending an email (sendmail on /var/mail/root) when the script failed.
From my understanding you can write your crons by editing
crontab -e
I've found several sources that instead refer to a bash script in the cron job, rather than writing a job line for line.
Is the only benefit that you can consolidate many tasks into one cron job using a bash script?
Additional question for a newbie: Editing crontab -e refers to one file correct?
Hello.
I need to make a script to crontab what check one folder and copy to another but I want that a file what will be copyed will be copyed to folder what is named to current month.
right now I'm using this crontab script
Code:
find /media/-Arhiiv-/0day/2012/ -maxdepth 2 -mindepth 2 -type d -mtime -7 -exec cp -r {} /home/user/Dropbox/Share/ \;
but what i want to make is to use python
Hi all,
I would like to schedule a crontab script, which should run From 8pm Thursday to 2am Friday and it should run every 10 minutes. I have put a script like below, is it the correct one.
Code:
10 01,02,20,21,22,23,00 * * 4-5 /u01/app/test.ksh
Any other options available to schedule the same interval.