gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Simons (JIRA)" <>
Subject [jira] Created: (GUMP-126) Simple scheduling support using a "gump run queue"
Date Sun, 01 May 2005 11:37:06 GMT
Simple scheduling support using a "gump run queue"

         Key: GUMP-126
     Project: Gump
        Type: New Feature
  Components: Python-based Gump  
    Versions: Gump3-alpha-6    
    Reporter: Leo Simons
     Fix For: Gump3-alpha-6

As discussed on the mailing list:

Naïve line-based schedule file using simple commands together with cron could be real nice.

Creating schedules
We should have something like

  gump schedule-run --profile=public --official
  gump schedule-run --profile=public
  gump schedule-run --profile=kaffe

Which writes a file $GUMP_HOME/schedule looking like this

  gump run --profile=public --official
  gump run --profile=public
  gump run --profile=kaffe

The code would be along the lines of

   local schedulefile="$GUMP_HOME/schedule"
   echo gump run $* >> $schedulefile

You would also want to schedule runs immediately

 gump schedule-run-first --profile=custom --debug

Which would be something like

   local schedulefile="$GUMP_HOME/schedule"
   echo gump run $* >> $
   cat $schedulefile >> $
   rm $schedulefile
   mv $ $schedulefile

And of course there's more options like

   local pidfile="$GUMP_HOME/pygump/"
   if [[ ! -f "$pidfile" ]]; then

The next bit is to have calls to those "schedule-run" commands in the

# the next run after midnight will be the "official" one
0 0 * * * . /home/gump/.bash_profile; gump schedule-run-first \
  --profile=public --official
0 6 * * * . /home/gump/.bash_profile; gump schedule-run \
0 12 * * * . /home/gump/.bash_profile; gump schedule-run \
0 3,9,15,18 * * * . /home/gump/.bash_profile; gump schedule-run-when-idle \

Keeping schedules
And then have something like

  gump try-to-invoke-run

Which checks to see if gump is running, and if not, takes a line from
$GUMP_HOME/schedule and executes it. Along the lines of

  local pidfile="$GUMP_HOME/pygump/"
  if [[ ! -f "$pidfile" ]]; then

And we run that real often from the crontab:

60/12 * * * * . /home/gump/.bash_profile; gump try-to-invoke-run

This would ensure gump would be running just about continuously, but you
could also easily interrupt using

 gump kill
 gump schedule-run-first --profile=custom --debug

To manually change the schedule if you wanted to try something.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message