cron or at does not require elevated permission but only be permitted by root: either you are present in cron.deny or at.deny, either you are not in cron.allow or at.allow, second being more likely...
get yourself in /var/adm/cron/cron.allow and you will be able to use crontab files (must be root to edit cron.allow...), look at the man pages of crontab...
You can write a while true script and fork it and background to run indefinely until it matches certain conditions (time a day, number of backup etc.)
This is a sample code without any error handling.
Your paste it into a shell script and run it like
That way scriptname.sh will be shown in ps -ef | grep scriptname.sh, so you can stop it by force (kill on pid or alike)
But rather user cron or at, that's what they are made for.
cron or at does not require elevated permission but only be permitted by root: either you are present in cron.deny or at.deny, either you are not in cron.allow or at.allow, second being more likely...
get yourself in /var/adm/cron/cron.allow and you will be able to use crontab files (must be root to edit cron.allow...), look at the man pages of crontab...
or use a loop with a sleep of 86400 ...
These are company servers that are locked down by a security system called KeON so yeah I'm probably in one of those files or there's some sort of group definition keeping admins in my function from doing anything like that.
---------- Post updated at 12:48 PM ---------- Previous update was at 12:46 PM ----------
Quote:
Originally Posted by Peasant
You can write a while true script and fork it and background to run indefinely until it matches certain conditions (time a day, number of backup etc.)
This is a sample code without any error handling.
Your paste it into a shell script and run it like
That way scriptname.sh will be shown in ps -ef | grep scriptname.sh, so you can stop it by force (kill on pid or alike)
But rather user cron or at, that's what they are made for.
Hope that helps
Regards
Peasant.
I like this idea - I'll try it out. If I have to re-push it every week or something I wouldn't have a problem with that at all. Just anything where I won't have to do it daily. Thanks!
What backup solution do you use and what backups are we talking about?
Do you backup to a tape library or something similar? Most tape libraries I worked with were able to initiate backups so there is no need to schedule anything at client side.
Is it a database you wish to backup? Some come with their own scheduling mechanism that can initiate backups too.
What backup solution do you use and what backups are we talking about?
Do you backup to a tape library or something similar? Most tape libraries I worked with were able to initiate backups so there is no need to schedule anything at client side.
Is it a database you wish to backup? Some come with their own scheduling mechanism that can initiate backups too.
No this is really simple stuff that would simply make my work a little easier. Things like going out to each server, getting a copy of the /etc/passwd file, putting all of them into 1, unique file, separating it by fields, processing a report that comes to me each week, little stuff like that.
Hello gurus,
I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired
report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup
is shown below:
#!/bin/ksh
db2... (3 Replies)
Hi,
1)
If some job supposed to run on 1st of every month at 7 AM
In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day?
2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct)
And if 25th... (5 Replies)
Hi ,
I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility )
I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Hello Everyone,
First of all, I highly appreciate all Linux forum members and whole Linux community. http://forums.linuxmint.com/images/smilies/icon_wink.gif. I wish you the best for all of you !
I will try to be short and concise: I am using Linux Mint 10 for 2 months on 2 ws, and all went... (3 Replies)
Hello All,
Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab???
Thanks in advance
Vaisakh (5 Replies)
I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Hi,
I can use 'crontabs –e' and do all the scheduling I like. However I would like to auto send myself just the cronjobs logs that fail. That is to say the PIDs that fail and the related lines with those PID’s only. (Not the full set of logs) Has anyone done this work? Or does an AIX 5.3 tool... (0 Replies)