Sponsored Content
Top Forums Shell Programming and Scripting crontab doesn't allow `command` ?? Post 302354952 by chebarbudo on Monday 21st of September 2009 04:43:10 AM
Old 09-21-2009
Hi tiger2000,

It happened to me once and it took me a while to figure it out. The probleme comes from the %. I have no idea why but for some reason, in the crontab, they must be escaped. Try:
Code:
0 0 * * * /root/quota/autoclean.sh > /root/quota/autoclean.`date '+\%Y\%m\%d'` 2>&1

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script doesn't get executed using crontab

I have the following crontab entry to run a shell script for every 30 minutes of every day: 30 * * * * $HOME/main.sh > $HOME/main.log 2>$HOME/error.log after I created the crontab file I have also done: $crontab my_crontab I also check to make sure it exists, by using the following... (11 Replies)
Discussion started by: radhika
11 Replies

2. Shell Programming and Scripting

Doesn't recognize the mv command

I'm nearly finished my program i've got everything in place and than when i run it it comes back with the reply mv: command not found. This is the code that seems to be causing the problem. elif then echo "There are more than one '$1' files in the system." echo "Please... (2 Replies)
Discussion started by: zoolz
2 Replies

3. Shell Programming and Scripting

When things doesn't run into crontab???

Could someone explain my problem? I've the following script... #! /bin/ksh ... vmquery -m $MediaID | awk ' BEGIN {FS=": " getline expdate <"ExpDate.txt" } $1 ~ /media ID/ {MediaNumber = $NF} ... $1 ~ /number of mounts/ { "date +%Y"|getline YearToday Year4 = YearToday - 4 if... (4 Replies)
Discussion started by: nymus7
4 Replies

4. Shell Programming and Scripting

Routine doesn't give output when executed in crontab

I have a script running in the crontab that gets data from a database every hour. Now I would like to execute a fortran routine to process the data in some way, after getting it and saving it locally. I have added the following commands to my script: set convert =... (1 Reply)
Discussion started by: SharkM
1 Replies

5. Shell Programming and Scripting

Expect script doesn't work under crontab

Hi All, Using Expect script when I run it manually it works. But when I put the entry in crontab, the job is still running after 15 hours. The script was created as root. I don't think it's a permission issue. Any idea? This is what I have under root crontab... 00 18 * * 1-5... (4 Replies)
Discussion started by: samnyc
4 Replies

6. Shell Programming and Scripting

cd command doesn't work through variables

Hi.... cd command is not working when dual string drive/volume name is passed to cd through variables....... For Ex.... y=/Volumes/Backup\ vipin/ cd $y the above command gives error....... anyone with a genuine solution ? (16 Replies)
Discussion started by: vipinchauhan222
16 Replies

7. Shell Programming and Scripting

IDL job doesn't work from crontab

I have made a script to execute an IDL routine with the purpose to plot data on a fixed time. The problem is that when I include this script in the crontab to run it every night, the IDL part doesn't work (the other commands, like getting data from the database, are carried out though). This... (4 Replies)
Discussion started by: SharkM
4 Replies

8. Shell Programming and Scripting

Command doesn't execute

Hi All. Little mystery here. I've been teaching myself perl, and I want to execute regular linux / unix commands i.e. cd .. , cd /etc and have been using the command(s) execute ("cd .."); or system ("cd .."); I don't get any error messages, even when I do a debug, but for some reason... (5 Replies)
Discussion started by: azrael2000
5 Replies

9. Shell Programming and Scripting

Job runs manually, doesn't work in crontab

I have a script (/home/admin/run_bkup.sh) that I can run manually to kick off an executable job. I want to run it in crontab, but it doesn't work. Here's the script: shell=/bin/bash today=$(date +"%m-%d-%y") /opt/CPsuite-R77/fw1/bin/upgrade_tools/upgrade_export mgt-svr-bkup-$today << EOF y... (18 Replies)
Discussion started by: df08388
18 Replies

10. Shell Programming and Scripting

Script containing Curl doesn't run with crontab

Hello I have a problem with the crontab command when I run a code containing Curl on the command line it runs without fail but as soon as I program it with crontab it executes everything except the curl returns fail thank you for helping me to resolve this problem because since Monday I look... (14 Replies)
Discussion started by: beautymind
14 Replies
QUOTAON(8)						    BSD System Manager's Manual 						QUOTAON(8)

NAME
quotaon, quotaoff -- turn filesystem quotas on and off SYNOPSIS
quotaon [-g] [-u] [-v] filesystem ... quotaon [-g] [-u] [-v] -a quotaoff [-g] [-u] [-v] filesystem ... quotaoff [-g] [-u] [-v] -a DESCRIPTION
Quotaon announces to the system that disk quotas should be enabled on one or more filesystems. Quotaoff announces to the system that the specified filesystems should have disk quotas turned off. The filesystem must be mounted and it must have the appropriate mount option file located at its root, the .quota.ops.user file for user quota configuration, and the .quota.ops.group file for group quota configuration. Quotaon also expects each filesystem to have the appropriate quota data files located at its root, the .quota.user file for user data, and the .quota.group file for group data. These filenames and their root location cannot be overridden. By default, quotaon will attempt to enable both user and group quotas. By default, quotaoff will disable both user and group quotas. Available options: -a If the -a flag is supplied in place of any filesystem names, quotaon/quotaoff will enable/disable any filesystems with an existing mount option file at its root. The mount option file specifies the types of quotas that are to be configured. -g Only group quotas will be enabled/disabled. The mount option file, .quota.ops.group, must exist at the root of the filesystem. -u Only user quotas will be enabled/disabled. The mount option file, .quota.ops.user, must exist at the root of the filesystem. -v Causes quotaon and quotaoff to print a message for each filesystem where quotas are turned on or off. Specifying both -g and -u is equivalent to the default. Quotas for both users and groups will automatically be turned on at filesystem mount if the appropriate mount option file and binary data file is in place at its root. FILES
Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence indicates that quotas are to be enabled for that filesystem. .quota.user data file containing user quotas .quota.group data file containing group quotas .quota.ops.user mount option file used to enable user quotas .quota.ops.group mount option file used to enable group quotas SEE ALSO
quota(1), quotactl(2), edquota(8), quotacheck(8), repquota(8) HISTORY
The quotaon command appeared in 4.2BSD. 4.2 Berkeley Distribution October 17, 2002 4.2 Berkeley Distribution
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy