2013-05-22 11:07:58 utc |
jmettraux |
furqan: hello and welcome to #ruote |
2013-05-22 11:09:17 utc |
furqan |
jmettraux |
2013-05-22 11:09:23 utc |
furqan |
thanks |
2013-05-22 11:09:24 utc |
jmettraux |
furqan: |
2013-05-22 11:11:31 utc |
furqan |
i have a question, i have a scenario in which i have to send out email notifications every last tuesday and last friday of every month. can i accomplish this using rufus ? |
2013-05-22 11:11:46 utc |
jmettraux |
yes¥ |
2013-05-22 11:12:18 utc |
furqan |
but how do i get last tuesday and friday ? |
2013-05-22 11:13:10 utc |
furqan |
i know tue#1 is first tuesday, right ? |
2013-05-22 11:13:33 utc |
furqan |
but how would i know which one is the last tuesday 4 or 5 ? |
2013-05-22 11:14:06 utc |
jmettraux |
check if today + 7 days falls in the same month |
2013-05-22 11:15:33 utc |
furqan |
if i do Date.today.end_of_month.beginning_of_week.next, will rufus accept this ? |
2013-05-22 11:16:38 utc |
jmettraux |
#at should accept it if it returns a date |
2013-05-22 11:17:02 utc |
jmettraux |
you can try ;-) |
2013-05-22 11:21:02 utc |
jmettraux |
furqan: https://github.com/jmettraux/rufus-scheduler/issues/54 added to the TODO list somehow, thanks! |
2013-05-22 11:22:14 utc |
jmettraux |
for now, I'd go with a cron job that triggers every tue/fri and then immediately exit if it's not the last tue/fri |
2013-05-22 11:23:03 utc |
furqan |
ah, i thought sun#1 was supported :/ |
2013-05-22 11:24:23 utc |
furqan |
https://github.com/jmettraux/rufus-scheduler, 2.0.9 was supposed to support this right ? |
2013-05-22 11:24:55 utc |
furqan |
i see, i got it now. |
2013-05-22 11:25:02 utc |
furqan |
u're right |
2013-05-22 11:34:16 utc |
furqan |
scheduler.at Date.today.end_of_month.beginning_of_week.next does not work. ArgumentError: no block or :schedulable passed, nothing to schedule |
2013-05-22 11:37:35 utc |
furqan |
finally i got it, scheduler.at Date.today.end_of_month.beginning_of_week.next.to_time |
2013-05-22 11:37:51 utc |
furqan |
and don't forget to pass a block |
2013-05-22 11:37:53 utc |
furqan |
:D |
2013-05-22 11:43:05 utc |
furqan |
jmettraux, one quick question. #at is converted to cron job right ? |
2013-05-22 11:58:56 utc |
jmettraux |
no, cron jobs and at jobs are implemented differently |
2013-05-22 12:09:47 utc |
jmettraux |
got to leave, if someone can pass him the message if he comes back... |