Crontab not processing parameters sent to script.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Crontab not processing parameters sent to script.
# 8  
Old 06-09-2015
I wonder if /etc/cron.hourly/ is a magic place where executables are run once an hour by root without a crontab entry - and without arguments.
If you have a crontab entry they are run twice...
BTW the man page for fstrim recommemds to run it weekly.
This User Gave Thanks to MadeInGermany For This Post:
# 9  
Old 06-10-2015
Awsome!

Just adding the absolute path works, in this case /sbin/fstrim on Debian.
Thanks for every-bodies help.

MIG: After further investigation, it does indeed seem that it is the case
that cron runs scripts at the appropriate named folder times. I eventually
moved all script files to a different location.

At the moment I'm experimenting with the frequency of calls to trim the
mount points. On occasions, it's releasing the entire capacity of the
partition i.e. 128GB. At the moment it is an empty partition and unused.
No idea where it is getting 128GB.

Quick note on dash shell... A lot is missing from it in the name of speed
and security and it requires a lot of experimenting to get your scripts
to work.

Last edited by ASGR; 06-10-2015 at 10:55 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Parameters in crontab

I need to write a shell script which send an alert if a particular script scheduled in cron is not triggered. My concern is that particular script which is scheduled in crontab, runs at night but it requires a file from upstream system as a feed prior to execution. it waits for that file upto 4... (2 Replies)
Discussion started by: Ankit Srivastav
2 Replies

2. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

3. Shell Programming and Scripting

Passing Parameters to Crontab

Hello Experts, I have a requirement to pass some parameters to Linux cron tab. For ex: My default cron entry looks like this as below: ------------------------------- 55 10 * * --... (7 Replies)
Discussion started by: MaheshChaudhari
7 Replies

4. UNIX for Dummies Questions & Answers

Perl Script:how to find how many parameters are required to run the script

How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies

5. Shell Programming and Scripting

ksh processing options and parameters

I have a requirement where I need to process both options and parameters. command line call ie xxx.ksh -sid TEST1 -search_str LOCKED user1 user2 ..... I am using the following peice of code but I am usure how I can loop through all my parameters user1, user2, ... Note at the minium... (2 Replies)
Discussion started by: BeefStu
2 Replies

6. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

7. Shell Programming and Scripting

want to pass parameters to awk script from shell script

Hello, I have this awk script that I want to execute by passing parameters through a shell script. I'm a little confused. This awk script removes duplicates from an input file. Ok, so I have a .sh file called rem_dups.sh #!/usr/bin/sh... (4 Replies)
Discussion started by: script_op2a
4 Replies

8. AIX

tuning network parameters : parameters not persist after reboot

Hello, On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command. tunrestore -R is present in inittab in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log ... (0 Replies)
Discussion started by: dantares
0 Replies

9. Shell Programming and Scripting

call a script from another script passing parameters

I want to call script2 from script1 passing parameters. I want to read the parameters list in script1, check the local directory (for example - lpath1|lpath2|lpath3|lpath4|lpath5|) for the existance of files and set the` lcount` to the number of files in this folder (`... (2 Replies)
Discussion started by: Lenora2009
2 Replies

10. Shell Programming and Scripting

help me in sending parameters from sqlplus script to unix shell script

Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files.. Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this? Please tell me... (2 Replies)
Discussion started by: Hara
2 Replies
Login or Register to Ask a Question