我想通过主题固定的特定电子邮件定期搜索我的gmail收件箱。有人知道如何自动执行此搜索吗?我正在使用gmailr软件包。任何想法将不胜感激。
最好的问候, 海伦
答案 0 :(得分:1)
我找到了使用AWS的解决方案。我详细介绍了here。
简而言之,您需要做的是:
设置CronR作业以定期运行它。
class BoundedBuffer {
final Lock lock = new ReentrantLock();
final Condition notFull = lock.newCondition();
final Condition notEmpty = lock.newCondition();
//shall we need to add volatile to the variables below
final Object[] items = new Object[100];
int putptr, takeptr, count;
public void put(Object x) throws InterruptedException {
lock.lock();
try {
while (count == items.length)
notFull.await();
items[putptr] = x;
if (++putptr == items.length) putptr = 0;
++count;
notEmpty.signal();
} finally {
lock.unlock();
}
}
public Object take() throws InterruptedException {
lock.lock();
try {
while (count == 0)
notEmpty.await();
Object x = items[takeptr];
if (++takeptr == items.length) takeptr = 0;
--count;
notFull.signal();
return x;
} finally {
lock.unlock();
}
}
}