Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just referred to the man page for crontab. If I read it correctly, 0,1,30,45.... will cause it to execute at the top of the hour, 1 minute past the hour, 30 minutes past the hour, and 45 minutes past the hour.
And it sounded like you wanted it to run 1 minute after running 'crontab crontab.test'. See the difference?
I'm not sure how to get cron to do that actually. You can set it to run every minute for the test:
*/1 * * * *
and then keep an eye on that log real-time with:
tail -f $HOME/crontest.log
I would like to think that you'd at least get some kind of error message every minute using that crontab. I used underscores there to indicate spaces. Make sure you don't use the underscores.
And i restart the machine, after that it start to work. but when i am trying crontab -l i found that it is using KCron. I cannot see any log in perll.log file.
How i can make the format to execute test.pl file every seconds?
You have to use _two_ angle brackets (before the '/tmp/perll.log'), so your log will be appended. With only one, the log file will be recreated each time it is written to.
Quote:
And i restart the machine, after that it start to work. but when i am trying crontab -l i found that it is using KCron. I cannot see any log in perll.log file.
It's working now? But no logging? I use Dillon's cron. I don't know anything Kcron. You should be able to see whatever crontab is currently being used by 'crontab -l' and also, on my system anyway, all the crontabs are stored in /var/spool/cron
Quote:
How i can make the format to execute test.pl file every seconds?
Read thru the man page for crontab, or search Google. I don't know if it's possible; I don't recall seeing any options for seconds. I don't have any more information for you, but I wish you luck finding the solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.