Tagged Questions
1
vote
1answer
43 views
Trying to create a cron to Rsync then tar the folder
I'm stuck at the first hurdle!
I want to run a couple of commands from a bash script. First something like this to rsync some directories:
rsync -e ssh -az [email protected]:/home ...
2
votes
4answers
107 views
command for counting number of active cron jobs in crontabs
Problem statement
I have 5 solaris boxes, some have Solaris 10 and some have Solaris 9.
All of them have many cronjobs in their crontabs.
I would like to know number of active cronjobs available, so ...
5
votes
1answer
165 views
Running cron script with lynx fails to work
I'm trying to automate a login process that can only be done through a browser. I am using the lynx browser to script the actions required to do this. Lynx does this by dumping a user's keystrokes ...
2
votes
4answers
157 views
Is there any handy command line tool to manage Cron jobs?
Would someone suggest any handy command line (NOT web) tool or script which adds, enables and disables Cron jobs? I am looking, for example, for the following (or similar) behavior:
sh manageCron.sh ...
1
vote
2answers
120 views
Using rsync in a cronjob when a password is needed
Basically I have a bash script that fetches Data from my server to perform a backup.
As it is now I have to start that script manually and enter the password and then wait for it to finish.
I would ...
15
votes
5answers
1k views
Correct locking in shell scripts?
Sometimes you have to make sure that only one instance of a shell script is running at the same time.
For example a cron job which is executed via crond that does not provide
locking on its own (e.g. ...
9
votes
2answers
357 views
How can I delete all files in a folder that haven't been accessed in a certain amount of time?
I'd like to run a nightly cron job that deletes all the files in a folder that haven't been accessed in a week or more. What is the most efficient way to do this in bash?
3
votes
1answer
468 views
Add a one-off scheduled task through a shell script?
I'd like to execute a task at a given time, once.
I know I can just use crontab -e to add it there, but I'd like to do that through a shellscript. crontab -e gives me some temporary file to edit ...