1: <?php
2:
3: /**
4: * This class models a cronjob
5: * that will be run on the Webhosting package for a domain name.
6: *
7: * @package Transip
8: * @class Cronjob
9: * @author TransIP (support@transip.nl)
10: */
11: class Transip_Cronjob
12: {
13: /**
14: * Cronjob name, a user defined name for this cronjob
15: *
16: * @var string
17: */
18: public $name;
19:
20: /**
21: * URL this url will be called when the cronjob executes.
22: * Must be a valid (subdomain) within the current webhosting package's
23: * domain name.
24: *
25: * @var string
26: */
27: public $url;
28:
29: /**
30: * Any output of this cronjob will be e-mailed to this email-address
31: *
32: * @var string
33: */
34: public $email;
35:
36: /**
37: * What minute of the hour to run the cron
38: *
39: * @see http://en.wikipedia.org/wiki/Cron
40: * @var string
41: */
42: public $minuteTrigger;
43:
44: /**
45: * What hour of the day to run the cron
46: *
47: * @see http://en.wikipedia.org/wiki/Cron
48: * @var string
49: */
50: public $hourTrigger;
51:
52: /**
53: * What day of the month to run the cron
54: *
55: * @see http://en.wikipedia.org/wiki/Cron
56: * @var string
57: */
58: public $dayTrigger;
59:
60: /**
61: * what month of the year to run the cron
62: *
63: * @see http://en.wikipedia.org/wiki/Cron
64: * @var string
65: */
66: public $monthTrigger;
67:
68: /**
69: * what day of the week to run the cron
70: * range: 0-7 where both 0 and 7 are Sunday
71: *
72: * @see http://en.wikipedia.org/wiki/Cron
73: * @var string
74: */
75: public $weekdayTrigger;
76:
77: /**
78: * Create a new cronjob
79: *
80: * @param string $name Cronjob name
81: * @param string $url Cronjob url to fetch
82: * @param string $email Mail address to send cron output to
83: * @param string $minuteTrigger Minute field for cronjob
84: * @param string $hourTrigger Hour field for cronjob
85: * @param string $dayTrigger Day field for cronjob
86: * @param string $monthTrigger Month field for cronjob
87: * @param string $weekdayTrigger Weekday field for cronjob
88: */
89: public function __construct($name, $url, $email, $minuteTrigger, $hourTrigger, $dayTrigger, $monthTrigger, $weekdayTrigger)
90: {
91: $this->name = $name;
92: $this->url = $url;
93: $this->email = $email;
94: $this->minuteTrigger = $minuteTrigger;
95: $this->hourTrigger = $hourTrigger;
96: $this->dayTrigger = $dayTrigger;
97: $this->monthTrigger = $monthTrigger;
98: $this->weekdayTrigger = $weekdayTrigger;
99: }
100: }
101:
102: ?>
103: