LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-19-2012, 09:40 AM   #1
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Rep: Reputation: 1
Question how to run (whereis) ulimit in crontab ?


Hi,

I am trying to run ulimit from crontab but I could not find where is ulimit located - whereis ulimit did not find anything.

Could please anybody help where is it or how to properly put it in crontab if it is some built-in command (where) ?

thank you,
kind regards,
M.
 
Old 09-19-2012, 10:26 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,653

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
ulimit is usually a shell builtin, not a binary

Have your cron job call a shell script that includes your ulimit and other commands
 
Old 09-19-2012, 11:19 AM   #3
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by AlucardZero View Post
ulimit is usually a shell builtin, not a binary

Have your cron job call a shell script that includes your ulimit and other commands
yes.
 
Old 10-01-2012, 06:43 AM   #4
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Original Poster
Rep: Reputation: 1
Can anybody please help to beginner how to solve it ?

crontab:
* * * * * /media/DATA/home/u1/bin/crontab/crontab-exec-script.sh /media/DATA/home/u1/bin/crontab/process-manager.sh all >> /var/log/_c-ROOT--process-manager.log 2>&1

crontab-exec-script.sh contains:
sh -c "/bin/bash; ulimit -t 1;'$shellscript'" # $shellscript is "/.../process-manager.sh" in this case

but I have got error:
/media/DATA/home/u1/bin/crontab/crontab-exec-script.sh: line 71: sh -c "/bin/bash; ulimit -t 1;/media/DATA/home/u1/bin/crontab/process-manager.sh": No such file or directory

"no such file or directory" message launched up because ulimit is builtin bash command. (without 'ulimit' it works properly.)


How 'sh -c "/bin/bash; ulimit -t 1;$shellscript" ' should look like ?


thank you very much for any clue,
kind regards,
Martin

Last edited by masuch; 10-01-2012 at 06:44 AM.
 
Old 05-20-2013, 01:03 PM   #5
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Original Poster
Rep: Reputation: 1
just to close this thread.
using following:
/usr/bin/timeout --signal=SIGTERM --kill-after=10s 30s
 
  


Reply

Tags
crontab, location, ulimit


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ulimit -s 40960 vs ulimit ulimit -s 10240 centguy Linux - Software 1 01-20-2011 07:00 PM
My BASH script work perfect when i run it manualy, but not when it run in the crontab roqarg Linux - Newbie 30 05-06-2010 02:37 PM
[SOLVED] Difference between manual run and crontab run? EnderX Linux - Newbie 3 01-15-2010 04:46 PM
the crontab job is not run ust Linux - Software 1 03-24-2008 08:03 PM
Cannot get crontab to run uncle-c Linux - Newbie 4 02-12-2008 07:05 AM


All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration