LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-23-2007, 06:19 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Rep: Reputation: 81
running cron jobs at random times


How is it possible to run cron jobs at random times?
 
Old 11-23-2007, 06:32 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
I do not think it's possible; although, you could run a script every so many minutes and code the random element into the script i.e.

#!/bin/sh

# Grab a random value between 0-32767.
value=$RANDOM
if[ $value -lt 240 ]; then
<executed command>
fi

This gives a 240 in 32767 chance of execution.
 
  


Reply


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
Cron jobs not running henrybg Linux - Enterprise 10 01-28-2013 11:23 AM
cron is running but jobs aren't kalahari875 Mandriva 4 03-15-2006 04:47 PM
One user's cron jobs not running dcroxton Linux - Software 5 03-06-2006 04:33 PM
shutdown only if no cron jobs are running Red Squirrel Linux - Software 4 08-31-2005 02:00 PM
cron jobs not running scarr3d Linux - Software 7 05-25-2004 05:21 PM


All times are GMT -5. The time now is 02:16 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