General :: Cronjob / Run The Files Everyday At 11.00 Pm?
Apr 23, 2010I need to run the files everyday at 11.00 pm (Monday to Friday).
How would I put on cronjob? I have files ready.
I need to run the files everyday at 11.00 pm (Monday to Friday).
How would I put on cronjob? I have files ready.
I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.
I have bunch of environment variables that i have to set always for my work.Someone mentioned i can write a script to dp this and i googled it but haven't been successful so far and have to manually do them every time. I have a tcsh shell.I read that i need to change the .login or .tcshrc files but havent been successful in finding these.
View 15 Replies View RelatedI am new to Linux and have Fedora 14 installed in my home pc and notebook, I installed open office 3.3.0 in both. The open office stops working next day and shows as not installed in the add/remove software in my home pc. I reinstall then it works in that session and nextday disappears, This has now happened five times. i installed linux only one week back and everyday i have been installing open office. I have been doing all the updates till now.
View 2 Replies View RelatedI want to write a shell script, so that at 9AM every morning a general will be sent automatically to my network users E-Mail ID. My users are as follows: akhtaruzzaman@a[URL], ariful.[URL] etc.
Below is my little effort:
# !/bin/bash
userlist=`cut -f 1 -d : /etc/passwd`
mail -s "mailbackup" << END
keep mailbackup in another drive daily for security purpose
I know crontab -e sets a cronjob in /var/spool/cron but how do I set a cronjob to run from /etc/crontab? Is there a command used for this or would I have to manually edit a certain file?
View 2 Replies View Relatedwe have requirement like we need to run the sql script, which needs to be executed for every 45 days.
View 1 Replies View RelatedI'm working on a bash script that will be run regularly via a cronjob. As there is no easy way for the user to see if it's running in the background, I'd like a have some kind of pop up window what say's something like "Process started" and "Process finished" when it's complete. Ive read though some similar threads and came across xmessage. It kind of does what I want, with the exception of:-Id like the message Process started to stay up for the whole process, but it looks like the script wont continue until the xmessage window is closed. I cant get any xmessages to appear when the script is run from a cronjob. It only appears if I run the script manually from a terminal window. Which is no good for me. If anyone has any suggestions that would be great and just to add, it's doesn't have to be xmessage, any text box would do. I'm working with Redhat 4 and 5, if that makes a difference. Chuck Norris destroyed the periodic table, because he only recognises the element of surprise.
View 2 Replies View RelatedI have called an script in cronjob named get_mac.sh as follows:
#!/bin/sh
MAC=`ifconfig eth0 |sed -n 1p|awk '{print $5}'|awk -F : '{print $1$2$3$4$5$6}'`
ARG_FILE="/etc/asterisk/scripts/server.params"
[code]....
Currently we have to comment out an rsync task every now and then. Is there a way to have a PHP script on the server so we can simply browse to it to uncomment the rsync task and another one to comment it out again ?
The rsync job is the only job in crontab so even if it means deleting / re-creating the job wouldn't be a problem. I just want to avoid connecting via SSH and VPN every time I am asked to disable it
Cron setup for execute at 4:30 pm on 2nd monday of each month.
50 16 8-14 * mon /home/user/script.sh
It seems to be ignoring the date range 8-14?
how I can receive emails about a cronjob execution or where to go to read about that? I am using CentOS 5.4.
View 2 Replies View RelatedI wrote this little script and it runs very well, however when I setup a cronjob it only runs if I am logged in. I would like to have this script running even when I am not logged in. At the moment it runs but only when I am logged in. I logged as denis and in terminal (su root) and edited crontab as shown below, what do I need to change or setup to have this script run when no-one is logged in the computer. I run Fedora 12 (64 bit)
backup script:
cd /home/denis/Documents
tar -czvPf /home/denis/Backups/docsbackups_$(date +%Y%b%d_%HH%MM).tar.gz /home/denis/Documents
# above line will produce file with name in this format "docsbackups_date&time.tar.gz" in the /home/denis/Backups folder
[Code].....
I am a PHP developer.I have always used XAAMP(in Windows7) for development purpose. I am driven to turn to Linux now . I have installed Ubuntu10.04-rev189(Wubi) in Windows7 recently. I have a PHP script which require the following tasks to be performed.
1. Give permissions "777" to the following files and folders:_cache media images /configs.php mages/config_photo_preview.jpg
2. Set up cron jobs on your site like this: /usr/local/bin/php -q /your-site-root-dir/cron/index.php I need to get an environment like XAAMP and perform the above mentioned tasks.
i wanted to ask you for help in setting up a cronjob, that restarts a game server.By now I made a script that kills the screen of the server and then restarts it.
View 2 Replies View Relatedi have a site where I need to run a couple of php scripts every day..therefore I was thinking to setup a cronjob to do this. Unfortunately I get a whole bunch of errors trying to do so.
I can execute the php scripts via a command line without problem, one example would be
php /home/site/domains/stie.be/public_html/admin/cronjobs/cronjob_daily_ssh.php
however when i enter this command as such in a cronjob I get an error saying php command not found ( or something similar , doing this out of memory)
I tried to add the full path to the php command, but also this doenst work
the best workaround I found was to execute the php scripts with a lynx - dump command, but obviously this is not the right way.
I am new to bash scripting (not programming in general).
I am writing a bash script that will run a Python script I have written.
I want to be able to do the following:
Pass parameters to the bash script via the cronjob (so I can have two cron jobs) one to be run with parameter 'foobar', and the other 'foo'
switch based on the parameter passed to the bash script (by switching, I mean an if/else based on the paramter passed to the bash script).
I would like to make a cronjob who makes a tag.gz of everything inside a directory in a recursive way. BUT there is a HUGE directory full of jpg's. I don't want this one in the backup.Additional points if it can backup symbolic links.
View 2 Replies View RelatedWhere can i find a list of cronjob return codes for linux/unix
View 1 Replies View RelatedI am trying to import .exp file to oracle database. I have written a script for the same, but i am able to run it manually with out any errors , but it failing from cronjob(Even though i am using absolute path every where) Follwoing is the command i am trying to execute from shell.
/opt/ORACLE/product/bin/imp test/test@testdb full=y ignore=y buffer=1000 log=/data01/import_all.log file=/data01/test.exp
I am using centos server, i delete and touch maillog file in /var/log/maillog but every other days it gets about 3 - 4GB please help how can i stop this
log are like this
Code:
Jun 27 04:23:09 localhost postfix/smtpd[25765]: warning: not enough free space in mail queue: 0 bytes < 1.5*message size limit
Jun 27 04:23:10 localhost postfix/smtpd[25765]: lost connection after MAIL from unknown[200.74.196.82]
Jun 27 04:23:10 localhost postfix/cleanup[25987]: 3F8E110011: message-id=<20100627032310.3F8E110011@localhost.bgssuk.com>
Jun 27 04:23:10 localhost postfix/cleanup[25987]: warning: 3F8E110011: write queue file: No space left on device
[Code]...
I have 2 partitions on my hard disk1. sda1 is ext3 partitoins with MINT linux2. sda2 ntfs partitions with my files and movies I want to copy, make backup of my sda1 partitions and store it to file (image) in some folder in sda2.In windows I have made that many times with Acronis and ghost, but I dont know how to make it in MINT.Is there some manual that explain that.
View 13 Replies View RelatedI wish it was under better circumstances...very morning at 6:25am syslog-ng stops logging, right after it attempts to log rotate. its odd... the daemon doesnt die... it gets a new PID, but doesnt write the output to /var/log/syslog.Yet if I manually restart or reload syslog-ng it works great... its just like it doesnt like the logrotate...I have googled around and tried a few things...first I changed the postrotate in the logrotate.d/syslog-ng
--------/etc/logrotate.d/syslog-ng---------
/var/log/syslog {
rotate 7
[code]....
I have a server A that needs to connect to another server (B) to transfer data everyday.[A] ==SFTP==> [B]
I am using SFTP for the data transfert between A and B. I configured B to allow authentication only with a key, not with password. However, anybody who acccess the filesystem of A, could steal the password.
So I thought I could password protect the private key from A. But in such a case, I need to store the password somewhere on A, so the server A can access the private key to connect to B. Finally, it is endless: i always have to store somewhere a secret on A. Is there another solution that allow to have an authentication between A and B without storing plain text secret on the server A ?
I'm using comcast, and I setup my server, everything works fine.But later I found out that the server inet address is changing everyday, and it makes my server almost not accessible.Is there anyway to fix that problem??
View 5 Replies View RelatedI am trying to run the following only once every three months but looks like it runs every day. I edited crontab -e and added the following:
Code:
0 23 * jul,oct,jan,apr * /path/to/script > /var/log/script.log 2>&1
I want to use a cronjob to start a script running streamripper to record radioshows when I'm not at home. I'm running 10.04 server 32 bit.
I've setup a cronjob via Webmin to start the recording. It runs the following script:
Code:
ORDNER=`date +%Y"_"%m"_"%d"-"%H"_"%M"(FM4)"` # 'ORDNER' means Folder and creates a folder with time/date to save the stream
streamripper http://mp3stream1.apasf.apa.at:8000/ -d /mnt/Samsung/Radio/$ORDNER --xs_padding=2000:500 -a -q -s
[Code]....
Is there any logfile or way to see why the script is killed or what stops the recording? When executing the script manually the recording runs just fine until I kill the process.
Is it possible to send a libnotify from a cronjob? I'd like a notify message when my daily backup is done. When I run my script from terminal everything is working fine, when (ana)cron runs it, it works as well but the notify is surpressed. My Guess was, that it happens because the jobs are run as root. Nevertheless is it possible to get a notification message?
View 4 Replies View RelatedI wrote a little backupscript wich is working fine if i start it from the shell manualy. But I'm not able to let it start automaticaly via cron in ubuntu 10.10.
Here the bashscript:
#!/bin/sh
####################################
#
#
#
####################################
[Code]......
I'm trying to change my desktop background on my fluxbox desktop every minute using cronjob to a random picture within my Pictures folderthis is crontab -e file;
Code:
# Edit this file to introduce tasks to be run by cron.
#
[code]....