I need to create a crone job to backup certain files on my disk without root permissions.
Also if I will be able to edit cronetab then I need to know how to edit it with any editor other than vim
Most UNIX have a /var/adm/cron/ directory where you find the allow and deny files for cron and at command but in linux I suppose you find then in /etc...
Just to say that to be able to use cronfiles the user must be allowed, if you dont have a cron.allow or cron.deny file then it should be OK, if not the user must be added...
As to edit... you would have to create your crontab file first following its syntax:
But linux has more options to it
Lets call the file user.cronfile
Once that done you just as user execute this way:
Now each time you want to modify - 2 options :
Either you edit your fuser.cronfile modify and save with the editor of your choice...
and you need to load the modified file again:
OR
You use, being the user:
to modify and save ( but its strangely looking like vi hehe...)
I am trying a cron on root user to backup to tape using TAR command
here is the cron entry
11 08 * * 6 /erdhot1cron 2>&1 >> /test3/scripts/dba/erdhot1cron.log
here is script inside - edhot1cron
#!/bin/bash
vsysdt=`date +%d%m%y`
date
tar -cvf /dev/st0... (4 Replies)
Dear Experts,
I want to create cronjob with the following steps:
1. go to directory /home/logs/
$cd /home/logs/
2. copy to /tmp/ the most recent file with "prefix" local_data_ and sufix ".gz"
ls -ltr
drwxr-xr- 4096 Nov 24 2009 bak
drwxr-xr-x 24096 Aug... (6 Replies)
I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Hi there, I have over 2000 systems (mainly Solaris) and I want to write a script that inserts a new root cronjob on each of those servers. obviously just adding a line to /var/spool/cron/crontabs/root looks like the easiest way, but i really dont want to have to send a HUP to crond on all boxes
... (3 Replies)
Hello,
Im fairly new to this and am hoping for your help in moving forward.
1. I need to carry out a FTP transfer from SERVER1 to SERVER2 at 3am every morning.
2. The FTP is to work on SERVER1
3. There will be many files to transfer (96 files per day)
4. I want to delete the files... (3 Replies)
Hello All,
Hope this finds you well. I am creating this shell script that will create cron jobs in crontab file. What I am provided with is the start time , intervals and # of trials. Based of Start time ( say 7:15 am ) and interval being 15 minutes, # of trial being 5 , I should create cron... (5 Replies)
hi all,
I'm so embarrasingly new; apologies.
So here's my dilemma; files are being uploaded to the server via a php script... this is therefore assigning ownership to 'nobody' rather than the account 'user'.
It's screwing with the permissions and then the owner can't ftp download images... (2 Replies)
Hi Experts,
I'm a SAP Basis, I have a small doubt would request you please help on this...
1. I wold like to copy files from one system to another system?
as per my knowledge "we have to mount the prod filesystem on the quality box and do a copy every day thru crontab script, or do it via... (2 Replies)
How do I write a perl script to get the cron jobs? I could do a
perl -e ' system "crontab -l > jobs.txt " ';
Is there a better way?
Then I can use perl to make changes to jobs.txt. How can I submit the changes.
I suppose I could use system "crontab jobs.txt", is there a better way?
... (0 Replies)
All
I am running a few scripts through a cron job. This is for checking some key services that are running on by box. The problem is, everytime the cron runs, it sends a mail to the root account. The root account mails need to cleared every now and then. Is there some way I can stop these... (1 Reply)