Example #1
0
<?php

/**
 * Copyright 2015 Venditan Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// If you run your application in a cluster or across multiple servers, then you might want to pass in a "from" value
// Which will override the automatic hostname lookup, and mean that events from several servers are treated the same
\Venditan\Success::expect('Regular job')->from('live-cluster')->every('hour')->sms('tom');
Example #2
0
<?php

/**
 * Copyright 2015 Venditan Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// This might be used in a cron that runs once every hour
\Venditan\Success::expect('Regular job')->every('hour')->sms('07000000000');
Example #3
0
<?php

/**
 * Copyright 2015 Venditan Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Or you might want to use a named recipient or group
\Venditan\Success::expect('Regular job')->every('hour')->sms('tom,support');
Example #4
0
<?php

/**
 * Copyright 2015 Venditan Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// This might be used in a cron that runs once every hour
\Venditan\Success::expect('Critical failure')->never()->sms('07000000000');
Example #5
0
<?php

/**
 * Copyright 2015 Venditan Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// This might be used in a cron that runs once every hour, but the job take a couple of minutes to run
// If we want to record some fact along with each heartbeat
\Venditan\Success::expect('Regular job')->every('65m')->sms('07000000000')->message('Took 30 seconds');