blob: 04726b2e9c634ab71e14cc5db8ce358743fbf914 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()
|