diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-12-07 16:53:18 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-12-07 16:53:18 +0000 |
commit | f54ca21bb5823e935f7fc910b3883ef630052297 (patch) | |
tree | cfd5b7d5b720862a13dad830ed9eae4ba7177df7 /fooconf-cron | |
parent | 9014e0f0b7bcb44ca3613f188876d207ce871053 (diff) |
move stuff into trunk
git-svn-id: file:///home/lennart/svn/public/fooconf/trunk@5 a3b0ba65-a9ea-0310-aec1-fe512e4e1665
Diffstat (limited to 'fooconf-cron')
-rwxr-xr-x | fooconf-cron | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fooconf-cron b/fooconf-cron new file mode 100755 index 0000000..04726b2 --- /dev/null +++ b/fooconf-cron @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# Hey Emacs, this is -*-python-*- code! + +from fooconflib import * + +def generateCronFragment(ctx = FooConfContext()) : + cursor = ctx.db.cursor() + + cursor.execute("SELECT name "+ + "FROM account, permission "+ + "WHERE enabled=\"t\" "+ + "AND permission.id=account.id "+ + "AND action=\"cron\"") + + while 1: + row = cursor.fetchone() + if row is None: break + + print ctx.makeSysUserName(row["name"]) + +if __name__ == "__main__": + generateCronFragment() |